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
You may also try like this:
$recentPost = Article::orderBy('id', 'desc')->limit(5)->get();
It's working fine for me in Laravel 5.6