Download the PHP package asignua/filament-scheduled-reports without Composer

On this page you can find all versions of the php package asignua/filament-scheduled-reports. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-scheduled-reports

Filament Scheduled Reports

Stand With Ukraine Latest Version on Packagist Tests License

Filament Scheduled Reports

Read this first: the worker does not run your panel's middleware. A report is built in a queue worker, as the report's owner, with no browser request behind it. The panel's middleware, the ServingFilament event and a second panel's bootUsing() do not run there. Anything that narrows what a person sees in the browser through those (a tenant-like global scope, a «current branch» setting, a value in the session) is missing in the worker, and the mail would carry every row to every recipient. Models' own global scopes, policies and the page's getEloquentQuery() do apply; the rest is yours to re-apply with ScheduledReportsPlugin::make()->beforeRun(fn (Authenticatable $owner, Panel $panel, ScheduledReport $report) => …), derived from $owner (a worker serves many jobs, so never from a value left by the previous run). Add ->requireScopeHook() and the plugin refuses to schedule, and pauses stored reports, on a panel without that hook. See Data scope in the worker.

Every Monday you open a table, set the same filters, press «Export» and forward the file. This plugin does it for you: «send this table every Monday at 9:00». It is the scheduling companion of filament-xlsx-export and reuses its export, so the file is the one the Export button would have produced.

The schedule form

The run's mail and the history

Requirements

PHP 8.3+, Laravel 12 or 13, Filament 5, asignua/filament-xlsx-export ^1.2 (installed with it), a working queue worker and the Laravel scheduler (php artisan schedule:run every minute), and a mail transport. Without a queue worker mail and runs are not sent: the queue is where they go.

Installation

The migration is loaded from the package. Register the plugin on every panel that should offer it:

Add the button next to the export on any table page (ListRecords or your own Page with a table):

The action finds the export action by name (xlsxExport; ->exportAction('name') for another) and inherits its column picker and options.

Gates (denied until you define them)

Without scheduleReport there is no button, the resource is closed and stored reports do not run. A false answer later pauses the report as owner_lost_access.

Data scope in the worker

The hook runs after the owner is signed in and before the page is built. If it throws, the run fails (and, after three failures, pauses) and no file is made.

Limits and who can undo a pause

max_reports_per_owner (20), max_recipients (25) and max_concurrent_per_owner (the export's queue.max_per_user) cap what one owner can pile up; a due report of an owner at the concurrency limit waits for the next minute, «Run now» is refused. A pause by a manager (manageScheduledReports) is binding: the owner cannot run, resume or duplicate that report, and a run that was already queued sends nothing. Report files and download links live file_retention_hours (7 days), and every download checks the scheduleReport gate and the page again.

Outside recipients

The form says it plainly: every recipient gets the data the owner can see, whatever their own access.

How a run works

scheduled-reports:run (registered every minute; schedule.enabled in the config) claims due reports and queues a job. The job acts as the owner, builds the page component from stored plain data (page class, filters, search, sort, columns, export options) with no HTTP request and no Livewire snapshot, asks the table for its own query and writes the file with the export's code. The file is attached up to max_attachment_mb (10); a bigger one goes as a link that needs a sign-in as the owner, and only the owner gets it.

Pauses: owner_lost_access (inactive, deleted, no panel, gate or page access), target_gone (panel, page, action, a used filter or tab, or every saved column is gone), tenancy_unsupported, failed, no_recipients, manual. A removed column is dropped with a warning in the history.

Limits

Configuration

php artisan vendor:publish --tag=filament-scheduled-reports-config — table names, schedule, attachment size, queue and connection, failure limit, history retention (history_days, pruned daily by scheduled-reports:prune), the «Run now» interval. Translations: --tag=filament-scheduled-reports-translations.

Testing

vendor/bin/phpunit. The race tests need real databases: bash tests/Databases/run.sh starts throwaway MariaDB 11.4 and PostgreSQL 16 containers and removes them. The workbench: bash workbench/serve.sh (seeded users in the script).

More plugins by asign

All plugins: https://filamentphp.com/plugins?q=asign

License

The MIT License (MIT). See LICENSE.md.


All versions of filament-scheduled-reports with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
asignua/filament-xlsx-export Version ^1.2
filament/filament Version ^5.11.2
illuminate/contracts Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asignua/filament-scheduled-reports contains the following files

Loading the files please wait ...