mercredi 24 juillet 2019

Laravel 5: Softdelete Custom delete column and method

I am implementing Laravel into a legacy project of my company and would like to override or extend the delete logic of the framework.

My current structure is using an enum structure for checking if data is deleted or not, Y if deleted and N if not deleted.

In the future, when the project is completely written in Laravel I can change the MySql structure but that is 2 years far in the future.

So far I have been using where condition when necessary to to get non deleted data.

I can change the default deleted_at column name easily but how can I override the delete method.

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire