Laravel 8 and Bootstrap

A guide in using the old default Bootstrap 4 in Laravel 8

On the recent launch of Laravel 8 there are some drastic changes with regards to the default css and authentication framework used (Tailwind & Jetstream respectively). In this post we'll see how we can use the old scaffolding for Laravel 8.

Create a new project

laravel new myproject

Generate basic scaffolding

Reference: https://github.com/laravel/ui

// Generate basic scaffolding...
php artisan ui bootstrap
php artisan ui vue 
php artisan ui react

// Generate login / registration scaffolding...
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth

Use the following for the old bootstrap + authentication scaffold

php artisan ui bootstrap --auth

Install front-end dependencies

npm install && npm run dev

Execute the migrations

php artisan migrate

Add Routes

Now on web.php we can add the following line:

// web.php

Auth::routes();

php artisan serve

At this point we should have the old scaffolding @ http://localhost:8000/login

Conclusion

In this post, we saw how to use the old scaffolding for Laravel 8 and it still works as expected. I personally am not yet familiar with the new changes (using Tailwind & JetStream) for L8 - but I am excited to know more about it in the next few days.