Answers for "order laravel query results"

PHP
1

laravel order by raw

$orders = DB::table('orders')
                ->orderByRaw('updated_at - created_at DESC')
                ->get();
Posted by: Guest on May-04-2020
1

laravel order by

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

Code answers related to "order laravel query results"

Browse Popular Code Answers by Language