Answer the question
In order to leave comments, you need to log in
Laravel Eloquent. How to choose a relationship model?
Hello!
How can you choose a model with relationships:
$article = Article::with('author')->where('status', true)->get();
$author->job->name;
$article = Article::with('author'->with('job'))->where('status', true)->get();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question