1 回答

TA貢獻1812條經(jīng)驗 獲得超5個贊
有許多 Laravel 包可用于報告,我相信以下包是一個很好的例子:
智能報表引擎
一個記錄良好的 PHP 報告框架(帶有許多代碼示例)。它可以作為原生 PHP 引擎和 laravel 包使用。以下是如何使用它將 SQL 查詢轉(zhuǎn)換為報告的代碼示例。
? $report = new ReportOptions(Constants::SRE_PUBLIC_REPORT, Constants::SRE_SQL,"SQL_01");
? ?$report->set_sql("select * from items where `Units_In_Stock` < 15 ")
? ? ? ? ? ->set_header("Header goes here")
? ? ? ? ? ->set_grouping(array("country"))? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ->label("id", "Product ID")
? ? ? ? ? ->select_all_fields();
? ?$engine = new CustomEngine($report);
? ?$report_path = $engine->create_report();
使用此引擎,您可以生成公共報告或?qū)⒃撘媾c您現(xiàn)有的登錄系統(tǒng)集成以生成私人報告。
- 1 回答
- 0 關(guān)注
- 126 瀏覽
添加回答
舉報