samedi 31 octobre 2015

3 relation how database should look and how to create queries wtih Laravel Eloquent?

I have 3 relations:

project can have many tasks and tast have one project

user can have many tasks and task can have many users

user can have many projects and project can have many users --> this relation I already have in pivot table project_user

How other tables should look like and how can I query them to take all tasks for current logged user and some project id ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire