# Queued

When dealing with a large resource selection (e.g. +20k models), you can choose to queue your export.

In your resource class, add the Maatwebsite\LaravelNovaExcel\Actions\QueuedExport to actions().

use Maatwebsite\LaravelNovaExcel\Actions\QueuedExport;

public function actions(Request $request)
{
    return [
        new QueuedExport(),
    ];
}
1
2
3
4
5
6
7
8

Now you should see "Export To Excel" in your list of actions.

Store To Excel

The users.xlxs file will be stored in your default storage folder. Behind the scenes the query is chunked with a chunk count of 200 and each chunk is queued.

You can customize this by using the withChunkCount() method.

/**
 * Get the actions available for the resource.
 *
 * @param  \Illuminate\Http\Request $request
 *
 * @return array
 */
public function actions(Request $request)
{
    return [
        (new QueuedExport)->withChunkCount(1000),
    ];
}
1
2
3
4
5
6
7
8
9
10
11
12
13

Queueing downloads is not supported! You can only queue exports that are stored to the disk.