I'll show you how to make a Bootstrap 5 Auth Scaffolding in Laravel 9 in this tutorial. Auth Scaffolding uses the Laravel UI package to create a user registration, login, dashboard, logout, reset password, and email verification.

Let's get started on Laravel 9 Boostrap 5 Auth Scaffolding right away.

Table of Contents

  1. Install Laravel 9 App
  2. Install Laravel UI Package
  3. Install Bootstrap 5 Auth Scaffolding
  4. Install and Run NPM Packages
  5. Configuration Database Credentials
  6. Migrate Tables to Database
  7. Run Laravel Development Server

Install Laravel 9 App

Navigate to the directory where you wish to install the Laravel 9 application in the terminal or command line. On my desktop, I preferred the workspace directory.

cd desktop\workspace

Using the command below, install the most recent Laravel 9 version called Laravel9Auth.

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

Install Laravel UI Package

In the next step, I'll update the directory to the Laravel9Auth location.

cd Laravel9Auth

and then use the following command to install the Laravel UI package before building Auth Scaffolding.

composer require laravel/ui

Install Bootstrap 5 Auth Scaffolding

In this stage, I'll install Boostrap 5 Auth Scaffolding by running the script below.

php artisan ui bootstrap --auth

Install and Run NPM Packages

I've successfully constructed auth scaffolding, so let's install and start NPM using the commands below.

npm install

If you do not have Node.js installed on your machine, you will be unable to run npm commands. If you don't already have it, go to the official Node.js website and download and install it.

It will take some time to completely install node modules on your Laravel 9 application; once node modules are installed, launch the NPM Dev using the following command.

npm run dev

If it asks you to run npm run dev twice, follow the instructions and run npm run dev again.

And if you're using a MAC or Linux, you may run both at the same time, as shown below.

npm install && npm run dev

Configuration Database Credentials

The most critical step is to configure your Laravel 9 app's database credentials. Navigate to your application's root directory, locate the .env file, and enter your database credentials as seen below.


Check that MySQL or MariaDB is already installed on your PC, in addition to PHP. If you do not already have MySQL/MariaDB, you can install it using XAMPP.

I've written a separate article on how to install XAMPP, which includes PHP, MariaDB, and Apache; simply follow the steps to install XAMPP on Windows 10/11.

Now that we've installed MariaDB, make sure your database is up and running before running the database migration command.

Migrate Tables to Database

Now, use the following command to migrate Laravel 9's default tables into your database.

php artisan migrate

Run Laravel Development Server

You have now completed all of the steps required to develop Laravel 9 Bootstrap 5 Auth Scaffolding. It is now time to start the development server and test the application with the command below.

php artisan serve

Recommended Posts

View All

Laravel 9 GEO Chart Example using LavaCharts

Learn how to create interactive GEO charts with Laravel 9 and LavaCharts. Visualize your data on maps and improve data analysis. Check it out now!

Laravel Has Many Through Eloquent Relationship

Laravel has many through pivot table, Laravel has many through relationship example, has_many through relationship Laravel, hasmanythrough laravel inv...

Laravel Dropbox api File Upload example using league/flysystem-dropbox

Learn how to upload files to Dropbox using Laravel and league/flysystem-dropbox in this step-by-step tutorial. Improve your Laravel skills today!

Laravel Multiple Where Condition Example

Laravel multiple where condition, Laravel multiple where not working, Laravel multiple where same column, Laravel 8 Eloquent multiple where condition...

Laravel 9 File Manager Tutorial Example

Learn how to implement a robust file manager in Laravel 9 with our step-by-step tutorial. This example will help you manage and organize files efficie...