Simple question - how do I order by 'id' descending in Laravel 4.
The relevant part of my controller looks like this:
$posts = $this->post->all()
As I understand you use this line:
->orderBy('id', 'DESC');
But how does that fit in with my above code?
If you are using post as a model (without dependency injection), you can also do:
$posts = Post::orderBy('id', 'DESC')->get();