diff --git a/src/Commands/Publish/PublishConfigurationCommand.php b/src/Commands/Publish/PublishConfigurationCommand.php index 4ec517a29..156dd3022 100644 --- a/src/Commands/Publish/PublishConfigurationCommand.php +++ b/src/Commands/Publish/PublishConfigurationCommand.php @@ -20,7 +20,7 @@ class PublishConfigurationCommand extends BaseCommand * * @var string */ - protected $description = 'Publish a module\'s config files to the application'; + protected $description = "Publish a module's config files to the application"; public function executeAction($name): void { @@ -36,14 +36,12 @@ public function getInfo(): ?string return 'Publishing module config files ...'; } - /** - * @param string $module - */ - private function getServiceProviderForModule($module): string + private function getServiceProviderForModule(string $module): string { $namespace = $this->laravel['config']->get('modules.namespace'); $studlyName = Str::studly($module); $provider = $this->laravel['config']->get('modules.paths.generator.provider.path'); + $provider = str_replace($this->laravel['config']->get('modules.paths.app_folder'), '', $provider); $provider = str_replace('/', '\\', $provider); return "$namespace\\$studlyName\\$provider\\{$studlyName}ServiceProvider";