In This blog, We are learn how to use vue js with laravel 7/6. laravel by default provide vue js setup. using vue you can create singal page application with laravel. now we are going step by step...
Now we are setup fresh laravel 7/6 project. using following command
composer create-project --prefer-dist laravel/laravel blog-vue
Then we are install laravel ui package
composer require laravel/ui
Now we are got laravel fresh project. then we are install laravel vue ui package. using laravel ui command also we are install bootstrap and react. fire following comman for laravel ui vue
php artisan ui vue
also you want to install laravel auth then fire this command..
Install Vue With Auth
php artisan ui vue --auth
after run php artisan ui vue command. you can show your resources. in this folder create two folder js and sass.
Now vue install successfully then we install NPM usign following command..
npm install all the vue js dependance in our project. it will create node_modules folder in our project.
Now we are ready to run laravel with vue project. when you change in project every time you have to run this command
npm run dev
if you don't run above command every time then you can fire this command
npm run watch
I hope it can help you...