Answers for "laravel orderby with relation"

PHP
-1

laravel orderby with relation

$users = User::with(['student' => function ($q) {
            $q->orderBy('id', 'desc');
        }]);
Posted by: Guest on May-04-2020

Browse Popular Code Answers by Language