DestructiveAction interface
#6927
Unanswered
hivokas
asked this question in
Ideas & Feature Requests
Replies: 1 comment 3 replies
-
|
I'm failing to see how an interface will help with
Doesn't extending |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently
DestructiveActionis a class which I should extend. It'd be nice if we had aDestructiveActioninterface which we could implement on any action, instead of extending a class. Same like we haveShouldQueueand other interfaces.Some actions in our app don't extend directly from
Laravel/Nova/Actionwhich makes it impossible to utilizeDestructiveAction.Previously I was suggested overriding
jsonSerialize(#3951 (comment)), but it's also not an ideal solution for us because our policy forbids running destructive actions without certain permissions.It think it'd be nice if we had a first party interface for this, instead of coming up with workarounds.
It doesn't seem hard to implement in a backwards-compatible way in the core.
Appreciate in advance.
Beta Was this translation helpful? Give feedback.
All reactions