Halim's avatar

Can I still use Breeze with Laravel 12?

I checked the Breeze GitHub repository, and it seems it’s no longer has a doc. They now suggest using the new starter kits, which require you to use either Vue, React, or Livewire.

However, for my app, I only want to use plain PHP (Blade) and possibly install Bootstrap 5 later and vanilla JS, no Tailwind or other frontend frameworks.

In previous Laravel versions, I usually installed Breeze, then removed the Tailwind code and converted everything to Bootstrap.

0 likes
3 replies
LaryAI's avatar
Level 58

Certainly! Here’s an up-to-date solution based on your needs:


Yes, you can still use Breeze with Laravel 12—at least as of early June 2024. While the official Laravel documentation for Breeze now encourages using the new Laravel Starter Kits, the Breeze package itself remains compatible with Laravel 12. You can still use the "Blade" (inertia-free) stack, which does not require Vue, React, or Livewire.

Here’s how you can do it:

1. Install Laravel Breeze

First, require Breeze via Composer:

composer require laravel/breeze --dev

2. Scaffold with Blade (No JavaScript Frameworks)

Run the install command for the traditional Blade scaffolding:

php artisan breeze:install blade

This command publishes views and authentication routes using only Blade templates, Tailwind CSS, and Alpine.js.
No Vue, React, or Livewire!

3. Remove Tailwind and Alpine (if you want Bootstrap instead)

The Breeze views come with Tailwind classes by default. To use Bootstrap:

  • Replace Tailwind classes in the /resources/views/auth and /resources/views/layouts files with Bootstrap 5 classes.
    (You can do this gradually, or copy in your own Bootstrap-based templates.)
  • Remove Tailwind dependencies:
    • Delete tailwind.config.js and postcss.config.js
    • In package.json, remove tailwindcss and postcss, and optionally alpinejs if you don’t want it.
  • Install Bootstrap (if desired) via npm:
    npm install bootstrap
    
    Then update your resources/css/app.css and your vite.config.js (or webpack.mix.js if using Laravel Mix) to import Bootstrap CSS.

4. Compile Assets

After making the changes, run:

npm install
npm run build

5. Done!

You’ll have authentication and basic scaffolding, which you can now fully customize to your liking using plain Blade and Bootstrap.


Summary:
You absolutely can use Breeze’s Blade (no-JS-framework) stack with Laravel 12, then refactor the frontend for Bootstrap or your preferred plain CSS setup. This works as it always has, even if the documentation is less prominent now.


References:

Feel free to ask for example files or step-by-step for applying Bootstrap!

Please or to participate in this conversation.