PHPackages                             visualbuilder/filament-export-scheduler - 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. [API Development](/categories/api)
4. /
5. visualbuilder/filament-export-scheduler

ActiveLibrary[API Development](/categories/api)

visualbuilder/filament-export-scheduler
=======================================

Configure scheduled routines for filament exporters

4.0.12(1mo ago)73.8k↑11.5%1[1 PRs](https://github.com/visualbuilder/filament-export-scheduler/pulls)MITPHPPHP ^8.2CI failing

Since Nov 17Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/visualbuilder/filament-export-scheduler)[ Packagist](https://packagist.org/packages/visualbuilder/filament-export-scheduler)[ Docs](https://github.com/visualbuilder/filament-export-scheduler)[ GitHub Sponsors](https://github.com/Visualbuilder)[ RSS](/packages/visualbuilder-filament-export-scheduler/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (2)Dependencies (23)Versions (84)Used By (0)

Configure scheduled routines for filament exporters
===================================================

[](#configure-scheduled-routines-for-filament-exporters)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8d6261a960097b124bb76896f0f3eaf211af9ad7a15effc54e00b63c5667304f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76697375616c6275696c6465722f66696c616d656e742d6578706f72742d7363686564756c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visualbuilder/filament-export-scheduler)[![run-tests](https://github.com/visualbuilder/filament-export-scheduler/actions/workflows/run-tests.yml/badge.svg)](https://github.com/visualbuilder/filament-export-scheduler/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/fd3f3f41ec8f8193d6421d9c55883c8bbabd082768e6e551d3225c52d0a3a0d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76697375616c6275696c6465722f66696c616d656e742d6578706f72742d7363686564756c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visualbuilder/filament-export-scheduler)[![GitHub commit activity](https://camo.githubusercontent.com/bcce7bfc9ff9a668237bc4b40dce31f944b8333835f79d2dab3bcdea27cf4d71/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f772f76697375616c6275696c6465722f66696c616d656e742d6578706f72742d7363686564756c6572)](https://camo.githubusercontent.com/bcce7bfc9ff9a668237bc4b40dce31f944b8333835f79d2dab3bcdea27cf4d71/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f772f76697375616c6275696c6465722f66696c616d656e742d6578706f72742d7363686564756c6572)

Email automated exports on a defined schedule - keep the management happy with timely reporting and minimise effort.

[![Export Schedules pack shot](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/social-card.jpg)](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/social-card.jpg)

Empower users to create their own reports
-----------------------------------------

[](#empower-users-to-create-their-own-reports)

[![List Schedules](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/reports-index.png)](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/reports-index.png)

Any Filament Exporter can be used as the starting point
-------------------------------------------------------

[](#any-filament-exporter-can-be-used-as-the-starting-point)

- Exporters will be discovered in `App\Filament\Exporters` or add more locations in the config
- Send Exports to other users
- To ensure data security only system users can receive reports

[![Setup Schedules](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/edit-export.png)](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/edit-export.png)

Filter By Available Attributes
------------------------------

[](#filter-by-available-attributes)

Exclude attributes with the `excludeFilterableAttributes` method available in the `InteractWithExportScheduler` trait.

This is useful for excluding attributes not present in the database or computed attributes/properties.

[![Filter by attributes](https://private-user-images.githubusercontent.com/70463535/459334482-3208ec5f-a7ad-470b-9443-3506dce28f7b.png?jwt=eyJ0e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09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzI5VDAyNTAxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA5ZmM5MTQ5ZWEzZDAzMDIyYTY2NWE1MjQ2YjUwYmYyZWQxZjM1NWY5ZDhiZDdkYjU5MGJiMzg0OGY4NjBlM2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6TOdAJMQYJUhqjuDOun_SZAoJncCkOrCobIh7wqNhM8)

Filter By Available Relationships
---------------------------------

[](#filter-by-available-relationships)

- BelongsTo relations (with `InteractsWithExportScheduler` trait set on the relation class) are automatically discovered.
- MorphTo relations can be filtered using dot notation paths.
- Exclude relations with the `excludeFilterableRelations` method available in the 'InteractsWithExportScheduler' trait.

[![Filter by relations](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3x-with-relationships/media/filter-by-relations.png)](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3x-with-relationships/media/filter-by-relations.png)

Easy Frequency Selection
------------------------

[](#easy-frequency-selection)

- Choose from preset frequencies
    - daily
    - weekly
    - monthly
    - quarterly
    - half yearly
    - yearly
- Or use a custom Cron for non standard schedules

[![Setup Schedules](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/cron.png)](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/cron.png)

Customise query data range
--------------------------

[](#customise-query-data-range)

- Choose from preset query ranges
    - today
    - yesterday
    - last 7 days
    - last week
    - last 30 days
    - last month
    - this month
    - last quarter
    - this year
- last year
- Custom date field if not created\_at can be set in the Exporter

You can also specify a custom period using **since X days/weeks/months/years ago** for even more flexibility.

Users can choose which columns to include
-----------------------------------------

[](#users-can-choose-which-columns-to-include)

- Currently all columns must be defined in the exporter
- Maybe will add ability to add user definable columns
- All Column Formatting options set in the exporter

[![Edit Columns](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/edit-columns.png)](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/edit-columns.png)

Attractive HTML Email templates
-------------------------------

[](#attractive-html-email-templates)

- Default HTML email template included
- Or works well with [Visual Builder Email Templates](https://github.com/visualbuilder/email-templates "Other Free Package") - if you want user editable emails
- Custom Report Builder and Templates coming soon

[![Email](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/vb-email.png)](https://raw.githubusercontent.com/visualbuilder/filament-export-scheduler/3.x/media/vb-email.png)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require visualbuilder/filament-export-scheduler
```

Copy views and migrations, run the migration

```
php artisan export-scheduler:install
```

Optionally seed an example schedule for the users table This will export all Users on the 1st of every month.

```
php artisan db:seed --class=ExportScheduleSeeder
```

Schedule Command in Laravel
---------------------------

[](#schedule-command-in-laravel)

To enable automatic sending you must add the console command to your scheduler.

### 1. Modify the Scheduler

[](#1-modify-the-scheduler)

Open `app\Console\Kernel.php`:

```
protected function schedule(Schedule $schedule)
{
    $schedule->command('export:run')->everyMinute();
}
```

### 2. Check servers cron

[](#2-check-servers-cron)

Ensure your server is set up to run Laravel's scheduler by adding this cron entry

```
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
```

### 3. Review the config file

[](#3-review-the-config-file)

Here you can

- override the resource page
- customise the navigation menu
- set the disk to be used
- customise which notification and email template is used
- set which user classes can receive reports

```
return [

    /**
     * To customise the Export Schedule Resource put your own resource here
     */
    'resources' => [ExportScheduleResource::class],

    /**
     * The success Notification and Mailable to use
     */
    'notification' => ScheduledExportCompleteNotification::class,
    'mailable' => ExportReady::class,

    /**
     * Allow users to choose from Exporters in these directories
     */
    'exporter_directories' => [
        'App\Filament\Exporters',
    ],

    /**
     * Where the exports should be stored local or s3
     */
    'file_disk' => 'local',

    /**
     * Admin Panel Navigation
     * See also Plugin options
     */
    'navigation' => [
        'enabled'      => true,
        'sort'         => 100,
        'label'        => 'Scheduled Report',
        'plural_label' => 'Scheduled Reports',
        'icon'         => 'heroicon-o-paper-airplane',
        'group'        => 'Reports',
        'cluster'      => false,
        'position'     => \Filament\Pages\Enums\SubNavigationPosition::Top
    ],

    /**
     * Which authenticatable models should be allowed to receive exports
     * Will be used to populate the Owner picker
     */
    'user_models' => [

        [
            'model' => \App\Models\User::class,
            'title_attribute' => 'email',
        ],
    ],
];
```

### 4. Ensure you have added the filament Export migrations

[](#4-ensure-you-have-added-the-filament-export-migrations)

If you don't have an exports table you can add it with:-

```
# Laravel 11 and higher
php artisan make:queue-batches-table
php artisan make:notifications-table

# Laravel 10
php artisan queue:batches-table
php artisan notifications:table

# All apps
php artisan vendor:publish --tag=filament-actions-migrations
```

Check the docs at:

#### Polymorphism - Using different user classes

[](#polymorphism---using-different-user-classes)

This package uses this by default, please ensure your exports migration has this line:-

```
 $table->morphs('user');
```

This will create the columns user\_type and user\_id to allow any user type to be associated with an export.

Note: This code has already been included in the package service provider so you don't need to include it.

```
Export::polymorphicUserRelationship();
```

Add the plugin to your filament panel provider

```
use Visualbuilder\ExportScheduler\ExportSchedulerPlugin;

public function panel(Panel $panel): Panel
    {
        return $panel
            ->default()
            ->plugins([
                ExportSchedulerPlugin::make(),
```

Make some export classes with

```
php artisan make:filament-exporter
```

New Feature - Filtering Exports by a related attribute/model
------------------------------------------------------------

[](#new-feature---filtering-exports-by-a-related-attributemodel)

Typical scenario might be exporting all Orders but filtered by a specific Organisation. In order to filter by organisation we need to know the field that should be searchable.

This requires adding the `InteractsWithExportSchedulerFilter` to the Models that can be filtered.

```
trait InteractsWithExportSchedulerFilter
{
    protected $filterOptionLabel = 'name';

    public function getFilterLabel(): string
    {
        return $this->filterOptionLabel;
    }

    /*
     * Exclude attributes that should
     * not be added to the filter
     * @return string
     */
    public static function excludeFilterableAttributes(): array
    {
        return [];
    }

    /*
     * Exclude relations that should
     * not be added to the filter
     * @return Illuminate\Database\Eloquent\Relations\Relations
     */
    public static function excludeFilterableRelations(): array
    {
        return [];
    }
}
```

The trait has the `$filterOptionLabel` property allowing us to define which column should be used for the filter label.

The `excludeFilterableAttributes` enables you to exclude attributes (including nested ones) when selecting a column. Suitable for attributes that do not exist in the database.

The `excludeFilterableRelations` allows you to exclude relations which should not be included in the filter, by default all BelongsTo relations will be included.

MorphTo relations are also supported when filtering nested attributes.

```

## Testing

```bash
composer test

```

To prove the integrity of the system the test suite creates these schedules and simulates running the tasks every day for 4 years to ensure leap years are handled correctly.

Test NameSchedule FrequencyCron ExpressionExpected Report TimeVerification Method (Example)User Export DailyDAILYN/AEvery day at 3:00 AMCheck for a new file/email at 3:00 AM each simulated day.User Export Weekly (Monday)WEEKLYN/AEvery Monday at 4:00 AMCheck for a new file/email at 4:00 AM every Monday.User Export Monthly (Day 15)MONTHLYN/AThe 15th day of every month at 5:00 AMCheck for a new file/email at 5:00 AM on the 15th of each month.User Export Monthly (Last Day)MONTHLYN/AThe last day of every month at 6:00 AMCheck for a new file/email at 6:00 AM on the last day of each month.User Export YearlyYEARLYN/AJanuary 1st of every year at 7:00 AMCheck for a new file/email at 7:00 AM on January 1st.User Export Leap Year TestYEARLYN/AFebruary 29th (during leap years) at 10:00 AMCheck for file/email on Feb 29th in leap years; verify handling in non-leap years.User Export Quarterly (Jan 10)QUARTERLYN/AJanuary 10th, April 10th, July 10th, October 10th at 8:00 AMCheck for a new file/email on these dates at 8:00 AM.User Export Half-Yearly (Jul 1)HALF\_YEARLYN/AJuly 1st and January 1st of every year at 9:00 AMCheck for a new file/email on these dates at 9:00 AM.User Export Weekdays 10:30 AMCRON`30 10 * * 1-5`Every weekday (Monday-Friday) at 10:30 AMCheck for a new file/email at 10:30 AM each weekday.User Export Quarter Ends 2:00 AMCRON`0 2 1 3,6,9,12 *`The 1st day of March, June, September, and December at 2:00 AMCheck for a new file/email on these dates at 2:00 AM.Codex Setup
-----------

[](#codex-setup)

When using this repository in the OpenAI Codex environment, a `.codex/setup.sh` script will install PHP, MySQL, and Composer during initialization when network access is available.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Lee Evans](https://github.com/lee)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance90

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 77.3% of commits — single point of failure

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 ~8 days

Recently: every ~1 days

Total

65

Last Release

52d ago

Major Versions

1.0.7 → 3.0.12024-11-19

3.0.44 → 4.0.12025-08-19

3.x-dev → 4.0.72026-03-09

PHP version history (2 changes)1.0.0PHP ^8.1

4.0.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/133e7275d57b3053e870a66332b987ae0be489e1c61938f22196d42cf19d2be9?d=identicon)[ekoukltd](/maintainers/ekoukltd)

---

Top Contributors

[![cannycookie](https://avatars.githubusercontent.com/u/500822?v=4)](https://github.com/cannycookie "cannycookie (157 commits)")[![codelikesuraj](https://avatars.githubusercontent.com/u/70463535?v=4)](https://github.com/codelikesuraj "codelikesuraj (36 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")

---

Tags

laravelvisualbuilderfilament-export-scheduler

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/visualbuilder-filament-export-scheduler/health.svg)

```
[![Health](https://phpackages.com/badges/visualbuilder-filament-export-scheduler/health.svg)](https://phpackages.com/packages/visualbuilder-filament-export-scheduler)
```

###  Alternatives

[rupadana/filament-api-service

A simple api service for supporting filamentphp

204103.8k7](/packages/rupadana-filament-api-service)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[tapp/filament-webhook-client

Add a Filament resource and a policy for Spatie Webhook client

1120.2k](/packages/tapp-filament-webhook-client)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)

PHPackages © 2026

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