Laravel package for exporting Word templates with placeholders as .docx or .pdf. Based on phpoffice/phpword.
composer require santwer/exporterFor PDF export, LibreOffice must be installed. See the 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.
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.
This package is licensed under the MIT License.