vendredi 29 juillet 2016

Don't know how to manage in laravel this database reality

I have this tables:

admins places grants

Each Admin has 0-N Place. Each Place has 0-N Grant. So we have:

admin_place grant_place (this one has an autoincremental id)

Now what I want to do is that, each Admin could have 0-N of those grant_place. So I have a table:

admin_grant_place

How do I express this in my Laravel app?

I have the Admin, Place and Grant Model classes. But, for example, how can I get all the grant_place that an Admin has?.

Thank you,



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire