Is there a way to run terminal commands simultaneously
Like
php artisan serve
And
npm run dev (for laravel vite)
Run it in a comment or terminal with a shortcut
There is another solution using concurrently npm package
first install concurrently (you can install it globally)
npm i concurrently -g
then run
concurrently "php artisan serve" "npm run dev"
or you can use it as package.json script
1 : update you package json like this
"scripts": {
"dev": "vite",
"build": "vite build ",
"start": "concurrently \"php artisan config:cache\" \"php artisan serve\" \"npm run dev \" "
},
2 : in terminal run npm start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With