laravel eloquent sort by asc code example
Example 1: sort laravel eloquent
$posts = Post::orderBy('id', 'DESC')->get();
Example 2: get all sort by laravel
$results = Project::orderBy('name')->get();
$posts = Post::orderBy('id', 'DESC')->get();
$results = Project::orderBy('name')->get();