Answer the question
In order to leave comments, you need to log in
How to take item which have the same column value in laravel?
Get all the news along with the link in the connection column. That is, the related news in the connection column should have the same value.
News::with(array( 'connections' /* Вот оно*/))->select([...]);
public function connections()
{
return $this->hasMany('App\News', 'connection','connection');
}
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