diff --git a/src/Commands/stubs/scaffold/provider.stub b/src/Commands/stubs/scaffold/provider.stub index 394256696..3a2dd6b6b 100644 --- a/src/Commands/stubs/scaffold/provider.stub +++ b/src/Commands/stubs/scaffold/provider.stub @@ -2,9 +2,9 @@ namespace $NAMESPACE$; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; - class $CLASS$ extends ServiceProvider { protected $moduleName = '$MODULE$'; @@ -57,6 +57,9 @@ class $CLASS$ extends ServiceProvider ], ['views', $this->moduleNameLower.'-module-views',]); $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower); + + $componentNamespace = str_replace('/', '\\', config('modules.namespace').'\\'.$this->moduleName.'\\'.config('modules.paths.generator.component-class.path')); + Blade::componentNamespace($componentNamespace, $this->moduleNameLower); } /**