Giter VIP home page Giter VIP logo

laravel-admin-grid-exporter's Introduction

laravel-admin extension

grid导出

所列即所导。

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

该插件基于Laravel-Excel 3.*开发。所以在使用前请将laravel-admin升级到v1.6.12版本之后。

安装使用

composer require zhusaidong/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 Zhusaidong\GridExporter\Exporter;

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

设置导出文件名

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

设置排除列

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

laravel-admin-grid-exporter's People

Contributors

zhusaidong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.