Skip to content

Commit

Permalink
fix commands registration
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny committed May 10, 2022
1 parent f480fb7 commit f0fed3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/ServiceProvider.php
Expand Up @@ -63,7 +63,7 @@ protected function registerCommands()
if (file_exists($commands = module_path(static::$module, 'Commands'))) {
$module = 'App\Modules\\' . str_replace('/', '\\', static::$module) . '\Commands\\';
$commands = array_map(function ($command) use ($module) {
return $module . str_replace('.php', '', $command);
return $module . str_replace('.php', '', $command->getFileName());
}, getFiles($commands));

$this->commands($commands);
Expand Down

0 comments on commit f0fed3d

Please sign in to comment.