PHPackages                             tu6ge/voyager-excel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tu6ge/voyager-excel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tu6ge/voyager-excel
===================

voyager excel export hook

v2.2.0(4y ago)214.9k↓50%11[1 PRs](https://github.com/tu6ge/voyager-excel/pulls)MITPHP

Since Feb 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tu6ge/voyager-excel)[ Packagist](https://packagist.org/packages/tu6ge/voyager-excel)[ Patreon](https://www.patreon.com/tu6ge)[ RSS](/packages/tu6ge-voyager-excel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (10)Used By (0)

Voyager Excel Export
====================

[](#voyager-excel-export)

[![Tests](https://github.com/tu6ge/voyager-excel/workflows/Tests/badge.svg?branch=master)](https://github.com/tu6ge/voyager-excel/actions)[![Coverage Status](https://camo.githubusercontent.com/0a8e43370c5d40d29a2129f894c2768531c3012331ef4f0342d099f2900298a5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f74753667652f766f79616765722d657863656c2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/tu6ge/voyager-excel?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/38acf8c36cdea7204d6c6402fbef6ec103aba82c267118131e7ae7399be8fa99/68747470733a2f2f706f7365722e707567782e6f72672f74753667652f766f79616765722d657863656c2f76)](https://packagist.org/packages/tu6ge/voyager-excel)[![Packagist Downloads](https://camo.githubusercontent.com/6dd6960eec640c2199473f8f1a274ebd4c5df33479865e71abaef56a9b2f4e12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f74753667652f766f79616765722d657863656c)](https://packagist.org/packages/tu6ge/voyager-excel/stats)[![styleci](https://camo.githubusercontent.com/ecf3b3dec97bb5f0ad26460b21bf1c31ff865ab0876e3144241c6ca18a56a922/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3233393435373135312f736869656c643f6272616e63683d6d6173746572)](https://github.com/tu6ge/voyager-excel)[![PRs Welcome](https://camo.githubusercontent.com/25b3e6d0d42c98de74a98cbb4d149a1c09020cf6d1361993b72d7d5b8ffed363/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://makeapullrequest.com)

a plugin of [voyager](https://github.com/the-control-group/voyager) for excel export

Required
--------------------------------------------

[](#required)

- *voyager* this is a missing laravel admin

Install
------------------------------------------

[](#install)

```
composer require tu6ge/voyager-excel
```

Usage
--------------------------------------

[](#usage)

- 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)

### 1. disable special Model

[](#1-disable-special-model)

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

[](#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.

[](#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` :

```
