mardi 15 mars 2016

Laravel attach to model that doesn't exist

I have projects and plot types in my application. A project can have many plot types.

The project table looks like this:

id    name

I also have a project_plot_types table that I want to enter information into. This table looks like:

id    project_id    name

What kind of relationship do I need? I do not have a plot_types table, so it's not a pivot relationship.

Can someone help?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire