Skip to content

Commit

Permalink
Move console route to Console class
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia committed Jun 19, 2023
1 parent 5e40384 commit 5a71b2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/closure-command/src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __invoke(): array
'id' => 'config',
'description' => 'The console route file of closure-command.',
'source' => __DIR__ . '/../publish/console.php',
'destination' => BASE_PATH . '/config/console.php',
'destination' => Console::ROUTE,
],
],
];
Expand Down
2 changes: 2 additions & 0 deletions src/closure-command/src/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

class Console
{
public const ROUTE = BASE_PATH . '/config/console.php';

/**
* @var ClosureCommand[]
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function process(object $event): void

private function registerClosureCommands(): void
{
$route = BASE_PATH . '/config/console.php';
$route = Console::ROUTE;

if (! file_exists($route)) {
return;
Expand Down

0 comments on commit 5a71b2e

Please sign in to comment.