Search code examples
phplaravelvue.jsnpmlaravel-artisan

How to run/develop laravel + vue.js (laravue) app properly


before i start, i need to say that i'm aware that this question is a beginner's one.

I've found this dashboard combination of Laravel and Vue.js that i wanted to play with, to then start developing a real web application. laravue

There's just a single question that is confusing me: while testing it on xampp with the commands "npm run watch" and "php artisan serve" i see myself obliged to npm run the project, every time i make a file change.

So what is the right way to check all the changes i make? By just refreshing the browser window.


Solution

  • npm run watch automatically builds your assets and then watch any save on the concerned files. Whenever a save happens, npm run watch rebuilds everything, but you won't be aware on your web browser except by refreshing.

    P.S: Sometimes npm run watch does not work well, then use npm run watch-poll instead

    https://laravel.com/docs/7.x/mix#running-mix