Replies: 3 comments 4 replies
-
Assuming this question is eloquent related ? |
Beta Was this translation helpful? Give feedback.
-
One obvious answer is to subclass the class these are in and do something like the following:
|
Beta Was this translation helpful? Give feedback.
-
I agree as I personally think a developer should not want to implement this same logic twice which would violate the DRY pattern. Besides that I would say having to implement this logic in a project violates the single responsibility principle as a u user model for instance shouldn't have to be bothered with doing a database transaction quietly. I have made a PR to address this issue: #43220 |
Beta Was this translation helpful? Give feedback.
-
Today I tried to use decrementQuietly but as it is protected I couldn't. Is it possible to make it public function?
Beta Was this translation helpful? Give feedback.
All reactions