We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
routes/console.php
1 parent b2a66a8 commit e216708Copy full SHA for e216708
src/Illuminate/Foundation/Configuration/ApplicationBuilder.php
@@ -282,7 +282,11 @@ public function withMiddleware(?callable $callback = null)
282
*/
283
public function withCommands(array $commands = [])
284
{
285
- if (empty($commands)) {
+ if (empty($commands) && is_file($this->app->basePath('routes/console.php'))) {
286
+ $commands = [$this->app->basePath('routes/console.php')];
287
+ }
288
+
289
+ if (empty($commands) && is_dir($this->app->path('Console/Commands'))) {
290
$commands = [$this->app->path('Console/Commands')];
291
}
292
0 commit comments