Skip to content

Conversation

@robertoarruda
Copy link
Contributor

@robertoarruda robertoarruda commented Aug 6, 2020

Created the method BaseRepository::forceDelete(), to force a hard delete on a soft deleted model to a entity in repository by id.
https://laravel.com/docs/7.x/eloquent#soft-deleting

@lloricode
Copy link
Contributor

and also, if you add a soft deleting functions, can you add restore function?

also, make validate the model if uses soft delete trait, so unexpected behavior will not occur

@robertoarruda
Copy link
Contributor Author

and also, if you add a soft deleting functions, can you add restore function?

According! Restore function added.

also, make validate the model if uses soft delete trait, so unexpected behavior will not occur

It is not necessary, since Eloquent already guarantees operation even without the SoftDelete trait
https://github.com/illuminate/database/blob/master/Eloquent/Model.php#L980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants