PHP code example of convenia / excel

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

    

convenia / 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"