laravel get all records order by
snippet in php

get all sort by laravel

user3932

$results = Project::orderBy('name')->get();

laravel get all records order by

user4714

$posts = Post::orderBy('created_at', 'desc')->get();

laravel get all records order by

user2446

$results = Project::orderBy('name')->get();