How to Install Bootstrap 4 in Laravel 7/6 Tutorial and Example

How to Install Bootstrap 4 in Laravel 7/6 Tutorial and Example

In this tutorial, we'll see how to install Bootstrap 4 in our Laravel 7/6 application by example.

How to Install Bootstrap in Laravel 7?

We simply need to install the laravel/ui package using Composer and installing the Bootstrap 4 package from npm.

The laravel/ui package provides the scaffoldings for bootstrap, vue and react. And the auth scaffold for login and registration.

Installing Bootstrap

Head over to your terminal, navigate to your Laravel 7 project and run the following command:

$ composer require laravel/ui

After successfully installing the package, we install Bootstrap 4 in our application using the following command:

$ php artisan ui bootstrap

You can also install the auth scaffoldings using the following command instead:

$ php artisan ui bootstrap --auth

Finally, you need to install the bootstrap package and the related frontend dependencies such as jquery from npm using the following command:

$ npm install


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