PHP code example of asuratu / laravel-admin-grid-exporter

1. Go to this page and download the library: Download asuratu/laravel-admin-grid-exporter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

asuratu / laravel-admin-grid-exporter example snippets


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

use Zhusaidong\GridExporter\Exporter;

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

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

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