laravel自定义视图目录服务提供程序
为什么会出现此错误:未找到查看[索引]。 我使用自定义视图目录 控制器laravel自定义视图目录服务提供程序,laravel,laravel-blade,service-provider,Laravel,Laravel Blade,Service Provider,为什么会出现此错误:未找到查看[索引]。 我使用自定义视图目录 控制器 public function index() { return view('categories::index'); } class CategoryServiceProvider extends ServiceProvider { public function boot() { $this->loadViewsFrom(__DIR__.'../V
public function index()
{
return view('categories::index');
}
class CategoryServiceProvider extends ServiceProvider {
public function boot()
{
$this->loadViewsFrom(__DIR__.'../Views', 'categories');
}
public function register()
{
$this->app->bind(CategoryRepositoryInterface::class, CategoryRepository::class);
}
}
服务提供商
public function index()
{
return view('categories::index');
}
class CategoryServiceProvider extends ServiceProvider {
public function boot()
{
$this->loadViewsFrom(__DIR__.'../Views', 'categories');
}
public function register()
{
$this->app->bind(CategoryRepositoryInterface::class, CategoryRepository::class);
}
}
不是吗
public function index()
{
return view('categories.index');
}
不是吗
public function index()
{
return view('categories.index');
}