Back

Link users table to stations table via user_stations


I'm totally confused how to do this with eloquent relationships. I think logically I understand how to do this but the practice seems much more difficult thus far. I created a Gist to show the objects I'm using in my API & Datamodel... https://gist.github.com/gracedigital/3af4332be75cd3e85f91201032e0d949

My latest attempt has not produced an error or results.
return $this->hasManyThrough('\UserFrosting\Sprinkle\Site\Model\Membership', '\UserFrosting\Sprinkle\Site\Model\Station', 'id', 'station_id');

Does anyone out there have experience with this. Any suggestions on the actual laravel/eloquent syntax to get this join working?


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us