laravel 8 sortby code example
Example 1: laravel 6 orderby
// Make sure column names are correct
$inquiries = Inquiry::orderBy('status', 'ASC')
->orderBy('created_at', 'DESC')
->get();
Example 2: laravel 6 orderby
$inquiries = Inquiry::all()->sortByDesc('created_at')->sortByDesc('Status')->values();