From d52dd9d064a1eaf5e80b774897bdd54627dc13fe Mon Sep 17 00:00:00 2001 From: JapSeyz Date: Tue, 17 May 2016 11:29:11 +0200 Subject: [PATCH] This allows the developer to reference views via PSR-4 BEFORE: If the file modues\moduleName\Resources\views\index.blade.php would try to @include('moduleName::layouts.nav') an error would be thrown because the views are not PSR-4 compliant. This fixes it After: @include('moduleName::layouts.nav') now works properly. --- Commands/stubs/scaffold/provider.stub | 1 + 1 file changed, 1 insertion(+) diff --git a/Commands/stubs/scaffold/provider.stub b/Commands/stubs/scaffold/provider.stub index fa1ca20..62f247f 100644 --- a/Commands/stubs/scaffold/provider.stub +++ b/Commands/stubs/scaffold/provider.stub @@ -18,6 +18,7 @@ class $CLASS$ extends ServiceProvider { */ public function boot() { + \View::addNamespace('$MODULE$', __DIR__ . '/../Views'); $this->registerTranslations(); $this->registerConfig(); $this->registerViews();