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