Skip to content

Commit a5f30b8

Browse files
committed
get dynamic path to provider
1 parent 4d70838 commit a5f30b8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Commands/Publish/PublishConfigurationCommand.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class PublishConfigurationCommand extends BaseCommand
2020
*
2121
* @var string
2222
*/
23-
protected $description = 'Publish a module\'s config files to the application';
23+
protected $description = "Publish a module's config files to the application";
2424

2525
public function executeAction($name): void
2626
{
@@ -36,14 +36,12 @@ public function getInfo(): ?string
3636
return 'Publishing module config files ...';
3737
}
3838

39-
/**
40-
* @param string $module
41-
*/
42-
private function getServiceProviderForModule($module): string
39+
private function getServiceProviderForModule(string $module): string
4340
{
4441
$namespace = $this->laravel['config']->get('modules.namespace');
4542
$studlyName = Str::studly($module);
4643
$provider = $this->laravel['config']->get('modules.paths.generator.provider.path');
44+
$provider = str_replace($this->laravel['config']->get('modules.paths.app_folder'), '', $provider);
4745
$provider = str_replace('/', '\\', $provider);
4846

4947
return "$namespace\\$studlyName\\$provider\\{$studlyName}ServiceProvider";

0 commit comments

Comments
 (0)