PHPackages                             agriserv/exports - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. agriserv/exports

ActiveLibrary[File &amp; Storage](/categories/file-storage)

agriserv/exports
================

Queued spreadsheet exports for Laravel apps. Wraps maatwebsite/excel with a tracked ExportJob + Livewire status UI.

v0.3.0(2mo ago)07proprietaryPHPPHP ^8.2

Since May 17Pushed 2mo agoCompare

[ Source](https://github.com/Mamdouh95/ag-export)[ Packagist](https://packagist.org/packages/agriserv/exports)[ RSS](/packages/agriserv-exports/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (6)Used By (0)

agriserv/exports
================

[](#agriservexports)

Queued spreadsheet exports for Laravel. Wraps `maatwebsite/excel` with an `ExportJob` tracking row and a Livewire status UI so requests don't time out on heavy reports.

Install
-------

[](#install)

```
composer require agriserv/exports
php artisan vendor:publish --tag=exports-config        # optional
php artisan vendor:publish --tag=exports-migrations    # optional
php artisan migrate
```

The service provider and `QueuedExports` facade are auto-discovered.

Requires PHP ^8.2, Laravel 10/11/12, `maatwebsite/excel` ^3.1, and `livewire/livewire` ^3.0.

Configure (env)
---------------

[](#configure-env)

```
EXPORTS_DISK=local          # any filesystem disk
EXPORTS_PATH=exports        # subfolder on that disk
EXPORTS_QUEUE=exports       # queue name workers listen on
EXPORTS_QUEUE_CONNECTION=   # leave blank to use default
EXPORTS_TRIES=3
EXPORTS_TIMEOUT=1800
EXPORTS_RETENTION_DAYS=7
EXPORTS_ROUTE_PREFIX=exports
```

Make sure a queue worker listens on the configured queue:

```
php artisan queue:work --queue=exports
```

Usage
-----

[](#usage)

Replace synchronous `Excel::download(...)` calls with:

```
use Agriserv\Exports\Facades\QueuedExports;
use App\Exports\InvoicesExport;

public function export()
{
    $query = Invoice::query()->filter(request()->all()); // your existing Builder

    $job = QueuedExports::queue(
        new InvoicesExport($query),
        filename: 'invoices-' . now()->format('Y-m-d-His') . '.xlsx',
        options: [
            'label' => 'تصدير الفواتير',
            // 'user' => auth()->user(),   // defaults to auth()->user()
            // 'disk' => 's3',             // override default disk
            // 'format' => 'xlsx',         // xlsx (default) | csv | tsv | ods | html
        ],
    );

    return back()->with('status', "تم إضافة طلب التصدير إلى الطابور (#{$job->id}).");
}
```

### Picking a format

[](#picking-a-format)

FormatWhen to use`xlsx` (default)Most cases. Supports styling, RTL events, multi-sheet. Whole workbook held in RAM until save — heavy on large datasets.`csv`**Large datasets (50k+ rows).** Streams cell-by-cell, memory stays flat regardless of row count. No styling. For Arabic, the export class should use `WithCustomCsvSettings` returning `['use_bom' => true]` so Excel renders UTF-8 correctly.`tsv` / `ods` / `html`Niche; same streaming/styling trade-offs as csv.The user sees their export appear in the status component:

```

```

The component polls every 4s while any export is pending/processing, then shows a download button (signed URL, 30 min) when complete.

Pruning
-------

[](#pruning)

```
php artisan exports:prune              # uses config retention_days
php artisan exports:prune --days=30
php artisan exports:prune --dry-run
```

Schedule it in `routes/console.php`:

```
Schedule::command('exports:prune')->dailyAt('03:00');
```

Notes on existing exports
-------------------------

[](#notes-on-existing-exports)

Your existing Maatwebsite export classes work as-is — pass them through `QueuedExports::queue()` instead of `Excel::download()`. The only caveat for queueing: the export instance is serialized onto the queue, so its constructor properties (Eloquent Builders, Collections) must be serializable. **Don't put closures inside the query** — rebuild the query from saved filters inside the export class instead.

For large datasets, add `implements WithChunkReading` and a `chunkSize()`method to your `FromQuery` export so it reads in batches rather than loading everything into memory.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance86

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

68d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/235bc6542e9b444197dc96c8a60cb6597681ff1fd9712ca7d94399bd9fdfd36d?d=identicon)[Mamdouh95](/maintainers/Mamdouh95)

### Embed Badge

![Health badge](/badges/agriserv-exports/health.svg)

```
[![Health](https://phpackages.com/badges/agriserv-exports/health.svg)](https://phpackages.com/packages/agriserv-exports)
```

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k96.5k1](/packages/mike-bronner-laravel-model-caching)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
