public function excel() { $qdn = Info::all(); Excel::create('QDN', function ($excel) use($qdn) { $excel->sheet($this->yearNow(), function ($sheet) use($qdn) { $sheet->fromArray($qdn); }); })->download('csv'); }