Email and exports

Excel export, email reports, filesystem, and queue configuration

Instant Excel export

Built-in bulk action export_excel downloads immediately (limit: 3,000 rows).

Override export behavior on your table class:

public function getExcelExportOptions(): array
{
    return [
        'view' => 'exports.users',
        // ...
    ];
}

Default export class (configurable):

'general_export_class' => Storageitsolutions\ApisTables\Exports\GeneralExport::class,

Email reports

Bulk actions with ActionsResponseWith::EMAIL_RES trigger EmailReportRequired → queued SendEmailReport listener → api-table:email-report command (limit: 100,000 rows).

Required config

'user_model' => App\Models\User::class,

'email' => [
    'mail_class' => Storageitsolutions\ApisTables\Mail\NewReportEmail::class,
    'subject_prefix' => 'Report: ',
    'from_address' => 'reports@example.com',
    'from_name' => 'Reports',
    'template' => 'APITables::mail.ReportEmail',
    'queue_connection' => null,
    'queue_name' => null,
],

'filesystem' => [
    'disk' => 'local',
    'path' => 'reports',
],

Queue

Ensure a queue worker is running when using email report actions. Configure queue_connection and queue_name under email if needed.

Custom mailable

Set email.mail_class to your own Mailable implementing the report attachment flow.

Blade export views

Place views at resources/views/exports/{tableName}.blade.php or set $exportView on your table class.

On this page