How to use Laravel-excel3.1
This article mainly shows you "how to use Laravel-excel3.1", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use Laravel-excel3.1" this article.
Routes are defined as GET
Route::get ('/ export', [OrderController::class, 'export'])
Controller forwarding
Public function export (Request $request): BinaryFileResponse {return Excel::download (new OrderExport ($request- > get ('status',-1)),' order.xlsx');}
Business code