InterviewSolution
Saved Bookmarks
| 1. |
How to use soft delete in laravel? |
|
Answer» Soft delete is a laravel feature that helps When models are soft DELETED, they are not actually removed from our database. Instead, a deleted_at TIMESTAMP is SET on the record. To enable soft deletes for a model, we have to specify the soft delete property on the model like this. In model we have to use namespace and we can use this After that when we will use delete() query then records will not REMOVE from our database. then a deleted_at timestamp is set on the record. |
|