PHPackages                             nova-kit/nova-queued-export-as-csv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. nova-kit/nova-queued-export-as-csv

ActiveLibrary[Queues &amp; Workers](/categories/queues)

nova-kit/nova-queued-export-as-csv
==================================

Laravel Nova's Queued Export As CSV Action

v2.3.0(1y ago)2159.1k↓29.6%3[2 PRs](https://github.com/nova-kit/nova-queued-export-as-csv/pulls)1MITPHPPHP ^8.1CI passing

Since Oct 10Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/nova-kit/nova-queued-export-as-csv)[ Packagist](https://packagist.org/packages/nova-kit/nova-queued-export-as-csv)[ RSS](/packages/nova-kit-nova-queued-export-as-csv/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (16)Used By (1)

Laravel Nova's Queued Export As CSV Action
==========================================

[](#laravel-novas-queued-export-as-csv-action)

[![tests](https://github.com/nova-kit/nova-queued-export-as-csv/actions/workflows/tests.yaml/badge.svg)](https://github.com/nova-kit/nova-queued-export-as-csv/actions/workflows/tests.yaml)[![Latest Stable Version](https://camo.githubusercontent.com/6bf102f7b6fc5c642adf82edd343600a77831df7cabe9c36d7d135bf87da441e/68747470733a2f2f706f7365722e707567782e6f72672f6e6f76612d6b69742f6e6f76612d7175657565642d6578706f72742d61732d6373762f762f737461626c65)](https://packagist.org/packages/nova-kit/nova-queued-export-as-csv)[![Total Downloads](https://camo.githubusercontent.com/8344e8c3e20014f57d7e42d23fc4a8faa47add80147c7c7ad32c96af456ca6ec/68747470733a2f2f706f7365722e707567782e6f72672f6e6f76612d6b69742f6e6f76612d7175657565642d6578706f72742d61732d6373762f646f776e6c6f616473)](https://packagist.org/packages/nova-kit/nova-queued-export-as-csv)[![Latest Unstable Version](https://camo.githubusercontent.com/9c233bdc9f974fed885ee409230e4efabe4b5abf83782fcde5db8eb03229392a/68747470733a2f2f706f7365722e707567782e6f72672f6e6f76612d6b69742f6e6f76612d7175657565642d6578706f72742d61732d6373762f762f756e737461626c65)](https://packagist.org/packages/nova-kit/nova-queued-export-as-csv)[![License](https://camo.githubusercontent.com/2824a46440389f6b1a1554e523f90c4407b7006da8cf491f0a4dffc3b60ebd4a/68747470733a2f2f706f7365722e707567782e6f72672f6e6f76612d6b69742f6e6f76612d7175657565642d6578706f72742d61732d6373762f6c6963656e7365)](https://packagist.org/packages/nova-kit/nova-queued-export-as-csv)

### Installation

[](#installation)

To install through composer, run the following command from terminal:

```
composer require "nova-kit/nova-queued-export-as-csv"
```

Usages
------

[](#usages)

You can replace `Laravel\Nova\Actions\ExportAsCsv` with `NovaKit\NovaQueuedExportAsCsv\Actions\QueuedExportAsCsv`:

```
use Laravel\Nova\Actions\ExportAsCsv;
use Laravel\Nova\Http\Requests\NovaRequest;
use NovaKit\NovaQueuedExportAsCsv\Actions\QueuedExportAsCsv;

// ...

/**
 * Get the actions available for the resource.
 *
 * @return array
 */
public function actions(NovaRequest $request): array
{
    return [
        QueuedExportAsCsv::make(),
    ];
}
```

If you would like to change the storage disk to store the CSV file that is available for download, you may invoke the `withStorageDisk()` method when registering the action:

```
use NovaKit\NovaQueuedExportAsCsv\Actions\QueuedExportAsCsv;

// ...

return [
    QueuedExportAsCsv::make()->withStorageDisk('s3'),
];
```

You can also customise the response message by using the following code:

```
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:

```
