PHP code example of eveleen / php-laravel-excel

1. Go to this page and download the library: Download eveleen/php-laravel-excel 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/ */

    

eveleen / php-laravel-excel example snippets


Excel::create('Laravel Excel', function($excel) {

    $excel->sheet('Excel sheet', function($sheet) {

        $sheet->setOrientation('landscape');

    });

})->export('xls');

composer 

Maatwebsite\Excel\ExcelServiceProvider::class,

'Excel' => Maatwebsite\Excel\Facades\Excel::class,

$excel = App::make('excel');

php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"