In my controller I have the code as below:
Excel::create('Laravel Excel', function($excel) {
$excel->sheet('Excel sheet', function($sheet) {
$sheet->setOrientation('landscape');
});
})->export('xls');
In config/app.php in aliases array i have defined this:
'Excel' => 'Maatwebsite\Excel\ExcelServiceProvider',
I dont know why i cant make it work this library... Any idea?
After all this you need to check whether or not you have this at the top:
use Maatwebsite\Excel\Facades\Excel;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With