{"id":13764244,"url":"https://github.com/tu6ge/voyager-excel","last_synced_at":"2025-07-11T14:34:32.912Z","repository":{"id":42668870,"uuid":"239457151","full_name":"tu6ge/voyager-excel","owner":"tu6ge","description":"voyager excel export --一个Voyager的Excel导出插件","archived":false,"fork":false,"pushed_at":"2024-02-18T20:57:37.000Z","size":80,"stargazers_count":21,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T09:50:01.143Z","etag":null,"topics":["admin-excel-export","excel-export","laravel","voyager"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tu6ge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":null,"patreon":"tu6ge","open_collective":null,"ko_fi":"tu6ge321","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-02-10T07:58:47.000Z","updated_at":"2024-08-29T08:29:46.000Z","dependencies_parsed_at":"2024-04-18T03:44:48.307Z","dependency_job_id":"547f5bb3-28f8-41b7-8514-def2c93c4534","html_url":"https://github.com/tu6ge/voyager-excel","commit_stats":{"total_commits":59,"total_committers":2,"mean_commits":29.5,"dds":"0.016949152542372836","last_synced_commit":"cc1ddf5d9e9e78601a97b8d87f02b67f3951148f"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/tu6ge/voyager-excel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tu6ge%2Fvoyager-excel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tu6ge%2Fvoyager-excel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tu6ge%2Fvoyager-excel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tu6ge%2Fvoyager-excel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tu6ge","download_url":"https://codeload.github.com/tu6ge/voyager-excel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tu6ge%2Fvoyager-excel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833283,"owners_count":23670617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-excel-export","excel-export","laravel","voyager"],"created_at":"2024-08-03T16:00:17.294Z","updated_at":"2025-07-11T14:34:32.859Z","avatar_url":"https://github.com/tu6ge.png","language":"PHP","funding_links":["https://patreon.com/tu6ge","https://ko-fi.com/tu6ge321"],"categories":["Plugin for Voyager"],"sub_categories":[],"readme":"\u003c!-- vscode-markdown-toc --\u003e\n\n\n\u003c!-- vscode-markdown-toc-config\n\tnumbering=true\n\tautoSave=true\n\t/vscode-markdown-toc-config --\u003e\n\u003c!-- /vscode-markdown-toc --\u003e\n# Voyager Excel Export\n\n[![Tests](https://github.com/tu6ge/voyager-excel/workflows/Tests/badge.svg?branch=master)](https://github.com/tu6ge/voyager-excel/actions)\n[![Coverage Status](https://coveralls.io/repos/github/tu6ge/voyager-excel/badge.svg?branch=master)](https://coveralls.io/github/tu6ge/voyager-excel?branch=master)\n[![Latest Stable Version](https://poser.pugx.org/tu6ge/voyager-excel/v)](https://packagist.org/packages/tu6ge/voyager-excel)\n[![Packagist Downloads](https://img.shields.io/packagist/dm/tu6ge/voyager-excel)](https://packagist.org/packages/tu6ge/voyager-excel/stats)\n[![styleci](https://github.styleci.io/repos/239457151/shield?branch=master)](https://github.com/tu6ge/voyager-excel)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\na plugin of [voyager](https://github.com/the-control-group/voyager) for excel export\n\n##  \u003ca name='Required'\u003e\u003c/a\u003eRequired\n\n- *voyager* this is a missing laravel admin \n\n##  \u003ca name='Install'\u003e\u003c/a\u003eInstall\n\n```bash\ncomposer require tu6ge/voyager-excel\n```\n\n##  \u003ca name='Usage'\u003e\u003c/a\u003eUsage\n\n* 1. [disable special Model](#disablespecialModel)\n* 2. [Allow export all records of special Model, default export selected records](#export-all)\n* 3. [Custom export excel content and format.](#custom-export)\n\n###  1. \u003ca name='disablespecialModel'\u003e\u003c/a\u003edisable special Model\n\nYou can disable export button in special Model :\n\n```\nclass Example extends Model\n{\n    public $disable_export = true;\n\n    // ...\n}\n```\n\n###  2. \u003ca name='export-all'\u003e\u003c/a\u003eAllow export all records of special Model, default export selected records\n\n```\nclass Example extends Model\n{\n    public $allow_export_all = true;\n\n    // ...\n}\n```\n\n###  3. \u003ca name='custom-export'\u003e\u003c/a\u003eCustom export excel content and format.\n\nNow, You can customize the export excel content and format, Use more features of `maatwebsite/excel`:\n\n1. Create a custom export class , and extends `Tu6ge\\VoyagerExcel\\Exports\\AbstractExport` :\n\n```\n\u003c?php\n\nnamespace YourApp;\n\nuse Tu6ge\\VoyagerExcel\\Exports\\AbstractExport;\n\nclass MyCustomExport extends AbstractExport\n{\n    protected $dataType;\n    protected $model;\n\n    public function __construct($dataType, array $ids)\n    {\n        $this-\u003edataType = $dataType;\n        $this-\u003emodel = new $dataType-\u003emodel_name(); // this is current Model instance\n        // $ids is user selected record ids \n\n        // write your own idea\n    }\n}\n```\n\n`Export` class more usage, see [laravel excel documents](https://docs.laravel-excel.com/3.1/exports/collection.html)\n\n2. Associate the export with your model:\n\n```\n\u003c?php\n\nnamespace Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass User extends Model\n{\n    public $export_handler = \\YourApp\\MyCustomExport::class;\n}\n```\n\nnow, you export this Model data , the excel format is your custom.\n\n##  \u003ca name='SupportLanguage'\u003e\u003c/a\u003eSupport Language\n\n- zh_CN\n- en \n\n##  \u003ca name='Test'\u003e\u003c/a\u003eTest\n\nrun `composer test` command.\n\n##  \u003ca name='License'\u003e\u003c/a\u003eLicense\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftu6ge%2Fvoyager-excel.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftu6ge%2Fvoyager-excel?ref=badge_large)\n\n##  \u003ca name='Links'\u003e\u003c/a\u003eLinks\n\n- [Voyager中文文档](http://doc.laravel-voyager.cn/)\n\n##  \u003ca name='Star'\u003e\u003c/a\u003eStar\n\nIf this packages helped you, leave a star for the author.\n\n##  \u003ca name='Contributing'\u003e\u003c/a\u003eContributing\n\n[Contributing Guide](https://github.com/tu6ge/voyager-excel/blob/master/CONTRIBUTING.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftu6ge%2Fvoyager-excel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftu6ge%2Fvoyager-excel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftu6ge%2Fvoyager-excel/lists"}