【发布时间】:2018-06-25 10:10:34
【问题描述】:
在研究如何使用集合 + HTML 视图将表列表数据导入 excel 文件时,我遇到了maatwebsite/excel 包。我设法按照文档导入了 excel。但是,我对作者使用的代码语法并不熟悉。在this link,作者定义了一个函数view(),如下代码所示:
public function view(): View
{
return view('exports.invoices', [
'invoices' => Invoice::all()
]);
}
我不熟悉 view(): View 语法。有人可以指导我找到适当的文档吗?告诉我如何在 Netbeans 中解决这个问题(见下面的截图)? Screenshot of Netbeans error
请记住,代码本身运行正常且没有问题。我可以按照我的要求下载 excel 文件。
使用:Laravel 5.6、PHP 7.1.17、NetBeans 8.0.2、maatwebsite/excel 3.0
对此的任何信息表示赞赏。提前致谢。
【问题讨论】:
标签: netbeans-8 maatwebsite-excel