Answer the question
In order to leave comments, you need to log in
How to get another one from the received collection from hasMany(), but for a different table?
Good day! Started learning Laravel (v5.8).
I have 3 tables: 1) audiences 2) devices 3) device_audiences
1)
2)
3)
I need to display a list of devices that are in it on the audience page. I do in the Audience model:
public function devices()
{
$this->hasMany(DeviceAudience::class);
}
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