This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I have a simple question. I have a two model related via a pivot table. I would like to set default data on a few column on the pivot table, as new relations are created. I would like to this without exposing the fields to the relation manager view. I cannot set these defaults in the database it must be done application layer.
I attempted to create a pivotModel & in the boot method use "static::creating" it seems that this does not work on "October\Rain\Database\Pivot" models.
Solved. By by just setting the relation_config actions to add & remove. That displays the manager after attach I then my static::saving method populates the other columns.
O, boy I need to solve this problem too, but I can't understand a word of previous solution...( What is " relation_config actions to add & remove"? Where to find "static::saving method" ?
1-3 of 3