We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24a04d5 commit 4c969f5Copy full SHA for 4c969f5
1 file changed
src/Illuminate/Foundation/DevCommands.php
@@ -52,10 +52,18 @@ class DevCommands
52
*/
53
public static function registerDefaults()
54
{
55
- self::artisan('serve --host=localhost', 'server');
56
- self::artisan('queue:listen --tries=1 --timeout=0', 'queue');
57
- self::artisan('pail --timeout=0', 'logs');
58
- self::node('dev', 'vite');
+ if (! app()->runningInConsole()) {
+ return;
+ }
+
59
+ foreach ([
60
+ 'server' => 'php artisan serve --host=localhost',
61
+ 'queue' => 'php artisan queue:listen --tries=1 --timeout=0',
62
+ 'logs' => 'php artisan pail --timeout=0',
63
+ 'vite' => self::getPackageManager()->getRunCommand('dev'),
64
+ ] as $name => $command) {
65
+ self::$commands[$name] = new DevCommand($command, $name);
66
67
}
68
69
/**
0 commit comments