Anyone can help me? I wanna do export excel. This is my controller code
public function export(){
$data['stok'] = Stokbarang::with('products')->get();
$tgl = thisDay();
return Excel::create('Stok'.$tgl, function($excel) use ($index) {
$excel->sheet('New sheet', function($sheet) use ($data) {
$sheet->loadView('panel.stok.excel',$data);
});
})->export('xls');
}
But it doesn't return an Excel file. It return like this instead an excel file
wht should I do? pls somebody help me to fix this.. thanks in advanced
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2SLisfH
via IFTTT

Aucun commentaire:
Enregistrer un commentaire