Static action method "message" for queued actions. #4592
Closed
Locked
Answered
by
davidhemphill
HenriqueSPin
asked this question in
Ideas & Feature Requests
-
It would be nice if Nova checks for a static method called "message" in a queue action class that would allow us to customize the feedback message shown to the user. Example: "Your report is being generated. You will be notified." |
Beta Was this translation helpful? Give feedback.
Answered by
davidhemphill
Jul 20, 2022
Replies: 1 comment 1 reply
-
I've added an update to allow for this. You need to use the <?php
namespace App\Nova\Actions;
//...
class QueuedAction extends Action implements ShouldQueue
//...
public function handleResult(ActionFields $fields, $results)
{
return Action::message('The action has been queued.');
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
HenriqueSPin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've added an update to allow for this. You need to use the
handleResult
method on your action instance. Nova will use the last result for the custom message: