Answer the question
In order to leave comments, you need to log in
How to get all club members' runs?
Available:
Club.php User.php club_users link M:M
Scampers.php (runs) User(id)-Scamper(id,user_id) link 1:M
How do I get all club members' runs?
user relation:
public function scampers()
{
return $this->belongsToMany(Scamper::class);
}
public function scampers()
{
return $this->hasManyThrough(Scamper::class, User::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