Skip to content

Commit

Permalink
Update provider.stub (Fix: Module components class issue)
Browse files Browse the repository at this point in the history
Fix: Module Components Class not working issue.
  • Loading branch information
solomon-ochepa authored Oct 24, 2023
1 parent 4d40dc3 commit 5bba01e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Commands/stubs/scaffold/provider.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace $NAMESPACE$;

use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;


class $CLASS$ extends ServiceProvider
{
protected $moduleName = '$MODULE$';
Expand Down Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 5bba01e

Please sign in to comment.