Yurii
How to stop an action on certain conditions with ->before()
I am using Detach action on RelationManager. However, on a model level I am restricting the ability to detach for some cases.
If I throw an exception from the model and it just displays the expection page. My expectation was that it would show the exception message as a failure notification but I cannot find how to configure it in the way.
5 replies
Filament exception handling
What about non-custom action? Currently, I am using Detach action on RelationManager. However, on model level I am restricting the ability to detach for some cases.
If I throw an exception from the model and it just displays the expection page. My expectation was that it would show the exception message as a failure notification but I cannot find how to configure it in the way.
5 replies
How to stop an action on certain conditions with ->before()
@Sascha did you find a better way to handle exceptions from actions?
Currently, I have similar question. Your approach would work, however, it's only presentation level condition/restriction and I am wondering if it is possible to throw an exception on a model level (if any action is not allowed) and handle it correctly here.
5 replies