Skip to content
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

[8.x] Add deleteOrFail to Model #38784

Merged
merged 1 commit into from
Sep 13, 2021
Merged

[8.x] Add deleteOrFail to Model #38784

merged 1 commit into from
Sep 13, 2021

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Sep 13, 2021

The deleteOrFail() method makes it more convenient to handle delete errors in destroy actions, as it is less verbose than checking the return value of delete().

See also:

Makes it more convenient to handle delete errors in destroy actions.
@taylorotwell taylorotwell merged commit a228123 into laravel:8.x Sep 13, 2021
victorvilella pushed a commit to cdsistemas/framework that referenced this pull request Oct 12, 2021
Makes it more convenient to handle delete errors in destroy actions.
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.

2 participants