Мне нужна помощь для передачи параметра по URL.
маршруты. php
Route::get('downloadExcel/{type}', 'ExcelController@downloadExcel');
blade-сервер. php
<a href="{{ URL::to('/downloadExcel/xls') }}" class="btn btn-warning btn-sm hidden-print"><i class="glyphicon glyphicon-export"></i> Export to Excel</a>
controller
class ExcelController extends Controller{
public function downloadExcel($type, Request $request)
{
return Excel::create('Laporan Kehadiran Harian', function($excel) use
($transaksi) {
$excel->sheet('mySheet', function($sheet) use ($transaksi)
{
$sheet->fromArray($transaksi);
});
})->download($type);
}
}