Answer the question
In order to leave comments, you need to log in
How to display 4 articles with values from a linked table in Laravel?
Greetings! I want to display the last 4 articles on the main page, I do this:
$new_articles = Article::orderBy('id', 'desc')->where('status', 1)->take(4)->get();
Answer the question
In order to leave comments, you need to log in
The wording of the question is not clear...
But who's stopping you from creating the hasMany(Article::class) relation for Country?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question