Skip to content

catlane/laravel-admin-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-admin extension

grid导出

所列即所导。

列表显示什么,导出就是什么,妈妈再也不用担心我设置各种字段了。

安装使用

composer require catlane/laravel-admin-grid-exporter

配置

打开config/admin.php

'extensions' => [
    'gridexporter' => [
        // Set this to false if you want to disable this extension
        'enable' => true,
    ]
]

设置

由于官方Grid的限制,不支持从外部读取$exporter属性,所以写了个静态方法Exporter::get($grid)来获取$exporter属性。

use Catlane\GridExporter\Exporter;

$exporter = Exporter::get($grid);

设置导出文件名

$exporter->setFileName('导出文件名.xlsx');

设置排除列

$exporter->setExclusions(['排除列1','排除列2']);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages