Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

How to get notified when queue is done on Laravel Excel (Maatwebsite)

Hello ,

I try to export a large data using the queue :

(new TeamleaderProjectExport())->queue('export_file.xlsx');

TeamleaderProjectExport :

<?php
namespace App\Exports;

use App\TeamleaderProject;

use Illuminate\Support\Facades\DB;

use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\WithChunkReading;
use Maatwebsite\Excel\Concerns\WithHeadings;

class TeamleaderProjectExport implements FromQuery, WithHeadings, WithChunkReading
{
    use Exportable;
    private $columnsListLabel = [
        "Phase title",
			...
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function query()
    {
        // Here the query
    }


    public function headings(): array
    {
        return $this->columnsListLabel;
    }

    public function chunkSize(): int
    {
        return 1000;
    }
}

It works and after the queue the file is saved in ``storage/app`

I'm wondering if it's possible to when the queue is done to send a notification to the user saying that the export is done with the file link ?

Any Idea ?

0 likes
1 reply

Please or to participate in this conversation.