-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add softDelete to media model #49
Comments
Because I don't need this myself, it's not high on my priority list. If you need this feel free to submit a PR. |
For future readers you can simply override the delete method in the model using soft delete: public function delete()
{
return parent::delete();
} The laravel-medialibrary delete method will not be called and will leave all medias untouched. |
Thanks for posting your solution! |
did the behaviour change? I just tried your solution and it did not prevent my media db rows from being deleted even though I added the code you posted to my App\User model. After softDeleting the user both the images as well as the db row were removed Do you have another workaround that works with latest version by any chance? |
I use soft delete for my models.
Now, when I delete items, they get soft deleted but media gets hard deleted.
So any chance to get a soft delete option in a future version?
The text was updated successfully, but these errors were encountered: