I enter npm run watch
first and then then I can't enter php artisan serve
. Is there a way I can use them in the same command?
Thanks
I enter npm run watch
first and then then I can't enter php artisan serve
. Is there a way I can use them in the same command?
Thanks
Open two terminals and enter npm run watch into one, and when that's ready run php artisan in the other terminal.
If this helps anyone, npm run hot
works correctly with Laravel 8 and Vue 2. I'm using built-in Vue scaffolding of Laravel UI (and not a separate Vue CLI project).
Just use php artisan serve
to serve your Laravel application and then open a new terminal window and run npm run hot
. Now the browser output will update automatically when you make changes to your Vue components.
Make sure your webpack.mix.js
contains the .vue()
call in its chain.