From 76b13108ae397544850b320b93d7a5b49ead1132 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 14 Dec 2022 16:13:11 +0800 Subject: [PATCH] wip Signed-off-by: Mior Muhammad Zaki --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index f2b3dfc..61ccd77 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,19 @@ return [ ]; ``` +You can also customise the response message by using the following code: + +```php +use Laravel\Nova\Actions\Action; +use NovaKit\NovaQueuedExportAsCsv\Actions\QueuedExportAsCsv; + +return [ + QueuedExportAsCsv::make()->then(function () { + return response()->json(Action::message('Action has been queued!')); + }), +]; +``` + In order to handle the stored CSV, you need to listen to `NovaKit\NovaQueuedExportAsCsv\Events\QueuedCsvExported` event, as an example you can broadcast to Nova's Notification using the following listener class: ```php