How to Install Vue.JS in Laravel 7/6 By Example

How to Install Vue.JS in Laravel 7/6 By Example

In this quick tutorial, we'll learn how to install and use the Vue.js library in your Laravel 6 or Laravel 7 project using the laravel/ui package.

A Separate Laravel 7/6 Package for Vue.js Scaffolding

The laravel/ui is a separate package that provides the UI scaffoldings for bootstrap, vue and react. Alongside with the auth scaffold for login and registration.

Provided that you already have a Laravel project setup. Head over to your command-line interface and run the following command:

$ composer require laravel/ui

Adding Vue to your Laravel 7/6 Project

After successfully installing the laravel/ui package, we can now add vue to our application.

Head back to your terminal and run the following artisan command:

$ php artisan ui vue

If you also need to add the auth scaffolding, add the --auth switch to the command:

$ php artisan ui vue --auth

Installing Vue.js Dependencies

Now, you also need to install the Vue.js dependencies from npm using the following command:

$ npm install

You should have node and npm installed in your system for the previous command to work.



How to use new Dumpable Trait in Laravel 11
Creating Custom Validation Rules in Laravel 11
How to Create Custom Middleware in Laravel 11
How to Create Custom Middleware in Laravel 11
How to Install Laravel 11 Application
How to Create Routes in Laravel 10
How to Generate App Key in Laravel 11?
How to Add Bootstrap 5 to Laravel 11
Build an app with Laravel 11 and MySQL
Livewire 3 refresh component
Building a RESTful API CRUD Application with Laravel 11
Should I use Livewire in Laravel?
Laravel 11 new features & release date
Laravel 10 CRUD Tutorial
Laravel 10 CORS Explained in Detail
Laravel 7/6 Auth Tutorial: Login/Register/Password Reset Example
PHP Laravel 7/6 Tutorial: CRUD Example App with Bootstrap 4 and MySQL Database
Laravel 7/6 Database Migrations Tutorial with Admin Roles Example
Laravel 7/6 Email Verification Tutorial and Example
Laravel 7/6 REST API CRUD Tutorial - Build a CRM [PART 2]: Eloquent Models and Relationships
Laravel 6/7 Tutorial & New Features - Creating and Migrating a MySQL Database
Laravel 7/6 CORS Tutorial and Example
How to Install Vue.JS in Laravel 7/6 By Example
How to Install Laravel 7 On Ubuntu, Windows and macOS
How to Install Bootstrap 4 in Laravel 7/6 Tutorial and Example

✋If you have any questions about this article, ask them in our GitHub Discussions 👈 community. You can also Gitter

❤️ Like our page and subscribe to our feed for updates!

Find a list of emojis to copy and paste