Site Admin
Site Admin Founder of MeaningArticles
1703 Views

How To Install Vue Js in Laravel 8?

Hello Dev.

In this article, I would like to share with you how to install vue js in laravel 8 application. we can learn installation vue in laravel 8. i am going to reveal you laravel eight install vue js. you may set up vue in laravel eight in then you can use bellow example.

This article will come up with the way to installation vue js in laravel 8 utility So let's see the bellow example.

So let's start the lesson...

Now we're setup clean and new laravel eight 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 were given laravel fresh project. then we're installation laravel vue ui package. using laravel ui command also we are install bootstrap and react. fire following command for laravel ui vue

php artisan ui vue

Additionally you want to install laravel auth then fire this command..


Install Vue With Auth

php artisan ui vue --auth

Now we installed vue, you could see on your directory resource/js folder.

After run php artisan ui vue command. you could show your resources. in this folder create 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's will to create node_modules folder in our project.


Install NPM

npm install

Now we are ready to run laravel with vue project. while you change in project every time you have to run this command


Run NPM

npm run dev

In case you do not run above command on every time then you may fire this command

npm run watch

I hope it assists you, thanks for visiting my article if you like my article then share it with your friends on the social media platform.

Happy Coding.....