laravel 8 authentication with laravel ui

In this tutorial you will see how to install Authentication with laravel ui package. laravel ui package Good for authentication scaffolding. it is simple ui , easy to install, if you are using bootstrap ui go for it.

Laravel 9 Authentication with Laravel Breeze


Laravel 8 Authentication with Laravel UI


Step 1: Set Up Laravel Project

Step 2: Set Up Database Details in ENV

Step 3: Install Laravel UI

Step 4: Step up Auth Scaffolding

Step 5: Run npm install && npm run dev command

Step 6: Migrate your database


Step 1: Set Up Laravel Project

Installing a fresh new laravel application, so head over to the terminal, type the command, and create a new laravel app.

composer create-project --prefer-dist laravel/laravel larainfo


Step 2: Set Up Database Details in ENV

Now, you have to connect the laravel app to the database, hence open the .env configuration file and add the database credentials as suggested below.

.env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=database_user_name
DB_PASSWORD=database_password


Step 3: Install Laravel UI

Next, you need to run below command in your terminal

composer require laravel/ui


Step 4: Step up Auth Scaffolding

use anyone for you requirements

php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth

Step 5: Run npm install && npm run dev command

you need to install first node npm if you do not have node npm package then install first other wise Laravel mix not working .

npm install && npm run dev

Step 6: Migrate your database

Next,run this command

php artisan migrate


Now our Laravel 8 authentication system is ready. you can run serve

php artisan serve

Read also

Laravel 8 Email Verification with Laravel UI