Skip to content

Commit

Permalink
get dynamic path to provider
Browse files Browse the repository at this point in the history
  • Loading branch information
dcblogdev committed Nov 16, 2024
1 parent 4d70838 commit a5f30b8
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 a5f30b8

Please sign in to comment.