F
Filament16mo ago
TiBiBa

Attach / Detach with timestamps and soft deletes?

Hi! For a BelongstoMany relationship with a pivot table we use the RelationManager and the Attach() and Detach() action to add and delete a relation. However, on the pivot table we also have timestamp columns (created_at, updated_at and deleted_at). Is there a way to use soft_deletes and make these follow the Laravel timestamps convention? Thanks in advance!
1 Reply
Patrick Boivin
Patrick Boivin16mo ago
Have you tried with a pivot model? You could replace the BelongsToMany with HasMany and implement soft deletes on it.
Want results from more Discord servers?
Add your server