santwer / exporter
Laravel Package for easy Word exports in Laravel on given Templates. This package is based on PHPWord.
v0.5.0.0
2026-03-21 09:39 UTC
Requires
- php: ^8.3|^8.4
- laravel/framework: ^10|^11|^12
- phpoffice/phpword: ^v1.4
- symfony/process: ^6.0|^7.0
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^10.0|^11.0
- phpunit/phpunit: ^10.0|^11.0
README
Laravel package for exporting Word templates with placeholders as .docx or .pdf. Based on phpoffice/phpword.
Installation
composer require santwer/exporter
For PDF export, LibreOffice must be installed. See the full documentation.
Full documentation
Full documentation: santwer.github.io/Exporter/ ยท Source: github.com/santwer/Exporter. The docs cover installation, configuration, export classes, template syntax, charts, images, tables, and more.
Quick example
use Santwer\Exporter\Facade\WordExport; WordExport::download(new MyExport(), 'export.docx');
Create an export class that implements FromWordTemplate (and optional concerns like GlobalTokens, TokensFromCollection). See the docs for export classes, template syntax, and configuration.
License
This package is licensed under the MIT License.