ibrahimtelman / voyager-excel-export
voyager excel export hook based voyager-excel package
1.0.1
2020-09-08 08:14 UTC
Requires
- larapack/hooks: ^1.0.5
- maatwebsite/excel: ^3.1
Requires (Dev)
- laravel/support: ^5.5 || ^6
This package is auto-updated.
Last update: 2025-03-08 18:41:15 UTC
README
a plugin for excel export
Install hook
php artisan hook:install voyager-excel-export
Enable hook
php artisan hook:enable voyager-excel-export
Usage
Add traits to model
use ExcelExport;
Add setter method to model
public function setExportable() { //list column of table which you want to export //type 1 ["key1", "key2"] //type 2 ["key1" => "New Name", "key2" => "New Name"] //or with closure ["key1" => [ "name" => "New Name", "value" => function($value, $model){ return $value } ]] //you all free to combine three options //example return array( "id", "fullname" => [ "name" => "Name", "value" => function ($value, $model) { return strtoupper($value); } ], "email" => "Email", "phone" => "Phone" ); }
Support Language
- tr
- en
- zh_CN (中文)
License
MIT