halt table toggle column
How can I halt (not updating DB) toggle column?
In my case, if recommend count is gte = 15, I want to hold that event and shows notification and hold update process, but it still updating, how can I make it "not to update table"
Thanks in advance
Solution:Jump to solution
I try like below and it's not updating anymore, so I think this validation error halt the process
```php
if ($recommendCount >= 15) {
Notification::make()
->title('Error')...
4 Replies
Not sure whether there is a way to halt it. Maybe just overwrite
updateStateUsing()
to add your validation. Did you try throwing a validation error from beforeStateUpdated()
?Solution
I try like below and it's not updating anymore, so I think this validation error halt the process
So that's working for you?
Yes, working.. thanks