讨论数量:
检查
bootstrap/app.php
<?php
require_once __DIR__.'/helpers.php';
应该使用require_once
引用文件,直接克隆的项目使用的是require
。
另外,注册函数应该使用function_exists
函数检查函数是否注册过。
补充:
如果使用了summerblue/administrator
包,还有地方需要更改。vendor/summerblue/administrator/AdministratorServiceProvider.php
.
.
.
public function register()
{
//include our view composers, and routes to avoid issues with catch-all routes defined by users
include __DIR__.'/../../viewComposers.php';
include_once __DIR__.'/../../helpers.php';
.
.
.
这里的 include
也需要更改为 include_once
刚刚踩坑发现的。
推荐文章: