WildsideUK / Laravel-Userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created_by` and `updated_by` columns on your model, populated by the currently authenticated user in your application.
https://wildside.uk
MIT License
570 stars 64 forks source link

detach doesn't work with userstamps #39

Closed canatufkansu closed 3 years ago

canatufkansu commented 3 years ago

When there is an belongstomany relationship, detach/attach methods doesn't fill user stamps fields.

For example;

Auth::user()->buyerDemandActions()->detach($args['buyer_demand_id']);

Doesn't fill deleted_by in the pivot table.

mattmcdonald-uk commented 3 years ago

Laravel pivot models don't support soft deletes.