In this tutorial, I would like to share with you how to install vue js in laravel 8 application. We will learn install vue in laravel 8. i am going to show you laravel 8 install vue js. you can install vue in laravel 8 in then you can use bellow example.
This tutorial will give you how to install install vue js in laravel 8 application So let's see the bellow example:
Now we are setup fresh laravel 8 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
Now we installed vue, you can see your resource directory js folder. it will be like as bellow screen shot:
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...