Install Vue.js in Laravel 7

By CodersDrive
28-Jun-2020
Vue.js

Vue.js is an open source progressive JavaScript framework used to develop interactive web applications. Vue is a reactive system that uses plain JavaScript objects and optimized re-rendering of elements in a DOM (Document Object Model).

Laravel provides various front end scaffolds like Boostrap, Vue and react. By following this post you can easily install Vue.js in your Laravel application. Download the laravel/ui package using composer.

composer require laravel/ui

Now install Vue.js using the below command. You can install it in two ways one way is only Vue another is Vue with auth.

Install Vue.js
php artisan ui vue
Install Vue.js with auth
php artisan ui vue --auth

Now your Laravel project is scaffolded with Vue.js. Next install JavaScript dependencies using NPM(Node Package Manager)

npm install

You can verify this by opening app.js present at location resources/js/ which includes the vue components and its instance details as shown like in below screen shot.

install vue.js in laravel 7

Once this installation is finished run the following command, this will create the required app.css file at public/css and app.js file at public/js.

npm run dev

Finished! you can start building Vue components in your project. Thank you for reading this post.


Laravel Laravel 7 Vue.js

Search blog..!

Connect with us