diff --git a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php index a0f9754d9697..89ec3b9cc50f 100644 --- a/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php +++ b/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php @@ -283,13 +283,7 @@ public function withMiddleware(?callable $callback = null) public function withCommands(array $commands = []) { if (empty($commands)) { - if (is_file($this->app->basePath('routes/console.php'))) { - $commands = [$this->app->basePath('routes/console.php')]; - } - - if (is_dir($this->app->path('Console/Commands'))) { - $commands = [...$commands, $this->app->path('Console/Commands')]; - } + $commands = [$this->app->path('Console/Commands')]; } $this->app->afterResolving(ConsoleKernel::class, function ($kernel) use ($commands) {