https://github.com/tu6ge/voyager-excel
voyager excel export --一个Voyager的Excel导出插件
https://github.com/tu6ge/voyager-excel
admin-excel-export excel-export laravel voyager
Last synced: 3 months ago
JSON representation
voyager excel export --一个Voyager的Excel导出插件
- Host: GitHub
- URL: https://github.com/tu6ge/voyager-excel
- Owner: tu6ge
- License: mit
- Created: 2020-02-10T07:58:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T20:57:37.000Z (over 1 year ago)
- Last Synced: 2025-06-21T09:50:01.143Z (4 months ago)
- Topics: admin-excel-export, excel-export, laravel, voyager
- Language: PHP
- Homepage:
- Size: 78.1 KB
- Stars: 21
- Watchers: 1
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Voyager Excel Export
[](https://github.com/tu6ge/voyager-excel/actions)
[](https://coveralls.io/github/tu6ge/voyager-excel?branch=master)
[](https://packagist.org/packages/tu6ge/voyager-excel)
[](https://packagist.org/packages/tu6ge/voyager-excel/stats)
[](https://github.com/tu6ge/voyager-excel)
[](http://makeapullrequest.com)a plugin of [voyager](https://github.com/the-control-group/voyager) for excel export
- *voyager* this is a missing laravel admin
```bash
composer require tu6ge/voyager-excel
```* 1. [disable special Model](#disablespecialModel)
* 2. [Allow export all records of special Model, default export selected records](#export-all)
* 3. [Custom export excel content and format.](#custom-export)You can disable export button in special Model :
```
class Example extends Model
{
public $disable_export = true;// ...
}
```### 2. Allow export all records of special Model, default export selected records
```
class Example extends Model
{
public $allow_export_all = true;// ...
}
```### 3. Custom export excel content and format.
Now, You can customize the export excel content and format, Use more features of `maatwebsite/excel`:
1. Create a custom export class , and extends `Tu6ge\VoyagerExcel\Exports\AbstractExport` :
```
dataType = $dataType;
$this->model = new $dataType->model_name(); // this is current Model instance
// $ids is user selected record ids// write your own idea
}
}
````Export` class more usage, see [laravel excel documents](https://docs.laravel-excel.com/3.1/exports/collection.html)
2. Associate the export with your model:
```
Support Language- zh_CN
- enrun `composer test` command.
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftu6ge%2Fvoyager-excel?ref=badge_large)
- [Voyager中文文档](http://doc.laravel-voyager.cn/)
If this packages helped you, leave a star for the author.
[Contributing Guide](https://github.com/tu6ge/voyager-excel/blob/master/CONTRIBUTING.md)