Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Laravel-excel3.1

Shulou Source: shulou.com Published: 2022-06-02 04:59:57 10月01日 Update

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

Tags: Content time article data status processing learning help business squadron squadron leader personnel code creator unit name remarks controller data source easy to understand Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi MariaDB Shulou Information OPPO Reno