laravel find all order by code example
Example 1: laravel order by desc
$posts = Post::orderBy('id', 'DESC')->get();
Example 2: laravel get all records order by
$results = Project::orderBy('name')->get();
$posts = Post::orderBy('id', 'DESC')->get();
$results = Project::orderBy('name')->get();