Pivot Model
Last updated
Was this helpful?
Last updated
Was this helpful?
The package trait could also be used on but you should adjust some things to make everything work.
Because the trait introduces a new relation your base model needs a primary key - we will use an auto-increment id
column. If you want to use an UUID string column or another key you have to set/adjust more things (tell the model and trait which is your primary key, adjust migration ...) but even this is possible.