Answers for "Laravel 7 order by desc"

PHP
5

laravel order by desc

$posts = Post::orderBy('id', 'DESC')->get();
Posted by: Guest on December-22-2020
0

laravel 6 orderby

// Make sure column names are correct
$inquiries = Inquiry::orderBy('status', 'ASC')
    ->orderBy('created_at', 'DESC')
    ->get();
Posted by: Guest on December-07-2020
-1

laravel 6 orderby

$inquiries = Inquiry::all()->sortByDesc('created_at')->sortByDesc('Status')->values();
Posted by: Guest on December-07-2020

Browse Popular Code Answers by Language