I have table of dogs in my DB and I want to retrieve N latest added dogs.
N latest added dogs
Only way that I found is something like this:
Do
My solution for cleanliness is:
Dogs::latest()->take(5)->get();
It's the same as other answers, just with using built-in methods to handle common practices.