这是我的app / Modules / ServiceProvider.php文件:
<?php namespace App\Modules;
class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function boot()
{
$modules = config("module.modules");
while (list(,$module) = each($modules)) {
if(file_exists(__DIR__.'/'.$module.'/web.php')) {
include __DIR__.'/'.$module.'/web.php';
}
if(is_dir(__DIR__.'/'.$module.'/Views')) {
$this->loadViewsFrom(__DIR__.'/'.$module.'/Views', $module);
}
}
}
public function register(){}
}
它没有加载我对模块的看法。
web.php是我的路由文件,因为我正在使用Laravel 5.2,它直接带有Routes,里面有web.php文件。
最初代码是使用routes.php文件。
我做错了什么?