I'm new to Laravel and thought it would be great to buy Codehappy Dayle Rees.
I just finished a blog tutorial and thought a bit about how he got posts from the Post model. Based on the .net background (ASP.NET MVC), I think it will be important to order messages when trying to download the author.
He loads the model as follows.
$posts = Post::with('author')->get();
My question is where can you use the order_by clause? order_by itself works when I use:
$posts = Post::order_by('id', 'desc')->get();
Relations RAVEN
Raven source
share