
Hi Guys,
In my last article, I shared How to install Vue in Laravel 8 manually without any package. Like we do install any other npm packages.
In this article I’m sharing, we can install Vue in laravel 8 using the laravel/ui package.
Note: Laravel/ui package will be maintained and available for future versions of laravel.
Read the above quote? great! now let’s go to the coding step right now.
What is Laravel/ui?
This legacy package is a very simple authentication scaffolding built on the Bootstrap CSS framework. it does provide a basic starting point using Bootstrap, React, and/or Vue that will be helpful for many applications.
Let’s jump to installation:
First, we will install a fresh laravel package, no problem if you have installed it already, but please install it.
composer create-project --prefer-dist laravel/laravel laravelui
Here laravelui is my laravel installation directory name, you can name it anything you want. I know you installed it. let’s go to next
Installing laravel/ui package
composer require laravel/ui
Now you will be able to ui artisan command to generate basic auth scaffolds. Let’s do that quickly
php artisan ui vue --auth
Okay, we just installed all laravel/ui and views. Now let’s install Vuejs and other npm packages using npm
npm install
npm run dev
Great! we just installed laravel/ui with vue scaffolds. now you can see an example component of vue in resources/js/components. you can use that example component in your hom.blade.php file inside body to check if vue is working or not.
just "<example-component></example-component> copy this code into your home.blade.php.
That’s all.
You can also check the manual installation of vue in laravel 8 here : How-to-install-vue-in-laravel-8


Leave a Reply