Skip to content

Commit

Permalink
Merge pull request #1981 from nWidart/fix-paths-for-publishing
Browse files Browse the repository at this point in the history
get dynamic path to provider
  • Loading branch information
dcblogdev authored Nov 16, 2024
2 parents 4d70838 + a5f30b8 commit 7e52dd9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Commands/Publish/PublishConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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";
Expand Down

0 comments on commit 7e52dd9

Please sign in to comment.