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