order by with eloquent code example Example: sort laravel eloquent $posts = Post::orderBy('id', 'DESC')->get();