Hello,
i am stuck on an eloquent query. I am rewriting an old app based in symfony 1.4 for Laravel 5.1.
My database structure looks like this:
user id name ...
project id description ...
subproject id project_id name ...
art id name ...
project_art id project_id art_id
project_art_user id project_art_id user_id
Project has many subprojects. Subproject belongs to one project. Project has many art. Art belongs to many subprojects. Project has many users which belong to project_art pivot.
How can i access the users that belong to the Project model, but only the users which are in the pivot project_art_user?
I know its seems complicated but i tried to explain it as good as it gets.
Thanks in advance
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community