skip to Main Content

How to get records in Laravel 9.x belongsToMany relationship orderBy relationship existence, followed by abstinence using pagination – PHP Versions

Laravel version 9.x PHP version 8.1 Current code. /** * Show the form for editing the specified resource. * * @param AppModelsSite $site * * @return IlluminateHttpResponse */ public function edit(Request $request, Site $site) { $site->load(['servers' => function($query) { $query->select('id')->orderBy('id',…

VIEW QUESTION
Back To Top
Search