sfneal / view-export
Export Views from Laravel applications to PDF or Excel files
Installs: 3 513
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.4
- dompdf/dompdf: >=1.0
- laravel/framework: >=7
- maatwebsite/excel: >=3.1
- sfneal/aws-s3-helpers: ^1.0
- sfneal/laravel-helpers: >=1.0.3
- sfneal/queueables: ^2.0
- sfneal/string-helpers: >=1.1
- sfneal/view-models: ^3.0
Requires (Dev)
- orchestra/testbench: >=3.8.0
- phpunit/phpunit: >=6.5.14
- scrutinizer/ocular: ^1.8
- dev-master
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.11.1
- 0.11.0
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.5
- 0.7.4
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.0
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-dev
This package is auto-updated.
Last update: 2024-11-09 00:52:59 UTC
README
Export Views from Laravel applications to PDF or Excel files.
Installation
You can install the package via composer:
composer require sfneal/view-export
To modify the view-export config file publish the ServiceProvider.
php artisan vendor:publish --provider="Sfneal\ViewExport\Providers\ViewExportServiceProvider"
Usage
PDFs
Exporting a PDF from a 'view'.
use Sfneal\ViewExport\Pdf\PdfExportService; // Set the view & upload path $view = view('your.view', ['example_data' => ['a'=> 2001, 'b' => 3012]]); $s3Key = 'path/to/save/your/file/example.pdf'; // Initialize an Exporter instance $exporter = PdfExportService::fromView($view)->handle(); // Upload the PDF $exporter->upload($s3Key); // Download in browser $exporter->download(); // Retrieve the upload path $path = $exporter->path();
Excel
Exporting an Excel file from a 'view'.
use Sfneal\ViewExport\Excel\ExcelExportService; // Set the view & upload path $view = view('your.view', ['example_data' => ['a'=> 2001, 'b' => 3012]]); $s3Key = 'path/to/save/your/file/example.pdf'; // Initialize an Exporter instance $exporter = ExcelExportService::fromView($view)->handle(); // Upload the PDF $exporter->upload($s3Key); // Download in browser $exporter->download(); // Retrieve the upload path $path = $exporter->path();
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email stephen.neal14@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
PHP Package Boilerplate
This package was generated using the PHP Package Boilerplate.