Did you use Laravel/UI in that project before?
If so, you don't have to change it. UI is still good and always will be.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
All the tutorials about Breeze, talk about installing it on fresh Laravel projects.
I have a project with few Models, Views and Controller and if I install Breeze, first of all, it replace some of my own code (including Router). Even with those files, it doesn't work (homepage doesn't work, registration works but gets redirected to home which doesn't exist and if it be redirected to /, it gives errors. Even if I try to handling mixing my own routers and views, I get errors in many places.
Can anybody share some resource with me on how to add Breeze on an existing Laravel project?
Did you use Laravel/UI in that project before?
If so, you don't have to change it. UI is still good and always will be.
No. I just started the project fresh and never installed any UI / Auth packages. I was looking for some easy way to make authentication and reached to Breeze.
@ahangarha I believe stubs from Breeze get copied in your routes file that's why it gets replaced.
Here are the stubs that are copied when you install it: https://github.com/laravel/breeze/tree/1.x/stubs/default
So what you can do is lists all files that will get affected by the install and merged them with your actual code (for example the routes file)
It doens't add much to route/web. with help of git, I can bring other things back. but still it doesn't work.
@ahangarha when you say you bring back your other code, maybe you are modifying Breeze code as well that's why it doesn't work?
You said you just started the project, so I assumed you only have few codes there. What you can do is install a fresh Laravel, then install Breeze and test if all Auth functionality is working. If so, copy your code little by little and see where it squawks.
Breeze is a starter kit, the (only) and good way to do what your want is to :
start a fresh project with Breeze
copy your previuous codes (migrations, views, ...) and adjust your routes (web.php, ...)
I made a fresh Laravel installation and then installed Breeze. Then I started comparing differences between the two website (Breeze on fresh installation and Breeze on existing project). Thsi is the result so far:
I saw some files didn't get copied properly. for example there was no alpinejs import in 'app.js' or there was some setting to define HOME to be set to dashboard view. I altered them manually.
The other thing which made me not understand what was going on was that Breeze uses blade components. Also its app.blade.php was designed to be used to authenticated users while I used to use app.blade.php for all users in my own program.
I think I am now on the track now. I will try to see if I can document this experience and publish it as an article.
@ahangarha I just installed Laravel Breeze into an existing Laravel9 site - and it's outside of my abilities to figure out how it impacted everything. Ex: It seems to have re-written web.php. Fine, I went back and re-added my routes - but now I'm getting errors that it can't find the controllers. I'm just experimenting here, so it's not much of a hassle. Have you found any documentation that's helpful navigating this?
Breeze on existing project
Non sense.
2nd time, Breeze is a starter kit, that's all, and that's great like this.
In my opinion, it'll be quicker to rename some views from your previous code than to try to adapt st undocumented. Even if you succeed the way of you want to do, that's be no valuable for others since it depends from your starting point ...
@sr57 indeed there is no point in sharing with others how you managed to get Breeze running in an existing project because every project is unique and has its own quirks. But what i find more difficult to understand is that the official Laravel Breeze documentation does not state you should not use the starter kit with an existing project. It only politely says you should use is with a fresh installation. Adding Breeze to an existing project might turn out that you need a deep understanding of how Laravel works to get all the errors fixed. So i do not wonder why many (private) projects lack authentication. If you did not think about it from the very beginning, you are lost. Or you move your existing code over to a fresh installation, but then your source control history might get lost.
Yes you can, provided you've built up a bit of Laravel and plenty of general debugging experience - i.e. you've had to dig yourself out of errors you don't understand before - so don't attempt it otherwise.
For reference it took me at least a couple of hours with a Laravel 10 app that I began writing in Laravel 5, but I'm very happy with it and it's been perfectly stable, and in my case it was far simpler than starting anew.
It'll overwrite your routes/web.php, your tailwind config and your vite config. So back these up first then use git to compare changes.
I created a brand new Laravel install with breeze, and then added breeze to an existing app. I used a macOS app called Kaleidoscope to compare the two installations.
For example that helped me fix a middleware error when accessing the various URLs (/login, /register, /profile etc.) Turned out I needed to do this in app/Http/Kernel.
- protected $middlewareAlias = [
+ protected $middlewareAliases = [
I also needed to adjust the initial Laravel DB tables...
e.g. password_resets has very recent been renamed password_reset_tokens (the name is also specified in config/auth.php in the $passwords array).
I also needed to add an import for the profile controller in routes/web.php:
use App\Http\Controllers\ProfileController;
Laravel Shift might also help you identify some of these things.
@wturrell " I used a macOS app called Kaleidoscope to compare the two installations."
Why not just use VS Code (source control tab) to compare the changed files?
@peeter it's true that you can use whatever you like. I could, at the time, have researched how to compare two repositories in Git, but I didn't as I thought i'd just use the app.
Is the composer command composer require laravel/breeze
not supposed to handle this?
https://laravel.com/docs/10.x/starter-kits#laravel-breeze-installation
@Towoju5 Breeze may be a package but its install script assumes it's a fresh Laravel installation, so you need to manually fix things if you're adding it to an existing app.
Please or to participate in this conversation.