Answers for "laravel eloquent order by with where and wherein"

PHP
2

laravel order by

$users = DB::table('users')
         -> orderBy('name', 'desc')
         -> get();
Posted by: Guest on March-09-2021
0

laravel OrderBy on Eloquent whereHas relationship

$counties = County::whereHas('items', function ($query) {
    $query->where('approved', 1);
})->orderBy('name')->get();
Posted by: Guest on May-07-2020

Code answers related to "laravel eloquent order by with where and wherein"

Browse Popular Code Answers by Language