Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

How best to install Laravel Breeze when I have Inertia and Svelte already Installed?

The Laravel Breeze scaffolding provides out of the box integration for React and Vue. However I am using svelte, which is already installed together with inertia and Vite. All I now want is Breeze including the breeze blade files. LaryAI has given me advice off line but I do not trust it. I would prefer not to manually authenticate as building that looks time consuming.

Many Thanks!

0 likes
44 replies
LaryAI's avatar
Level 58

To install Laravel Breeze when you already have Inertia and Svelte installed, you can follow these steps:

  1. Install Laravel Breeze using Composer:
composer require laravel/breeze --dev
  1. Publish the Breeze assets:
php artisan breeze:install
  1. Update your webpack.mix.js file to include the necessary Breeze assets. For example, if you're using Svelte, you can add the following lines to your webpack.mix.js file:
mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css')
    .postCss('resources/css/app.css', 'public/css', [
        //
    ])
    .svelte();
  1. Run the Laravel Mix build command to compile your assets:
npm run dev
  1. Finally, you can include the Breeze blade files in your views. For example, you can add the following line to your app.blade.php file:
@include('vendor.breeze.auth-layout')

With these steps, you should have Laravel Breeze installed and integrated with your existing Inertia and Svelte setup.

Snapey's avatar

Hi Vince.

I would probably create a new project with breeze and (presumably) the blade stack, then use it as boilerplate for your own app, copying the required controllers and blade views into your main project.

1 like
vincej's avatar
Level 15

@Snapey Hi Mark! I would like to go that way,I have started with a clean Laravel install, but the out the box blade stack is optimised for React and Vue. LaryAI gives a way to deploy for svelte. Does it look tight in you mind?

Secondly, when you say "copy over" you dont' mean through GitHub right, you mean off of a downloaded zip, right?

vincej's avatar
Level 15

Ok, so I ran composer require laravel/breeze --dev followed by php artisan breeze:install and now I have a panel asking which version of Blade do I want, ( see image ) The truth is I do not want ANY of these versions. I just want vanilla Blade, as I am using svelte, not react, not vue, nor Livewire. LaryAI is killing me.

https://pasteboard.co/olCub6KLvzeX.png

Snapey's avatar

@vincej I'm talkin about creating a new project (with blade+alpine) and learning from it, copying what files you need INTO your real project (like, you know, copy+paste)

And then.... delete the new project

2 likes
vincej's avatar
Level 15

@Snapey Ok, understood. I am doing things a little different.

I am undertaking a substantial upgrade from a mountain of legacy apps Laravel/UI, MIx, Bootstrap, JQuery, API's, Laravel/ Collective to: Breeze, Vite, Tailwind , Inertia,, Svelte, Spatie-HTML (MAYBE!)

So Ihave created a totally fresh clean install of Laravel, and am adding all these new bits manually. I HATE the way Taylor has specified what we should use ie Vue or React or Livewire.

all I want is vanilla Breeze. JDLRW has told me to forget Breeze and just manually authenticate people as Breeze and Sanctum are inadequate - more work, which i want to avoid.

1 like
Snapey's avatar

@vincej not sure what you are missing here in your understanding

Don't install breeze if you have already modified things in your app

Create a fresh laravel 10 app

initialise git, add the files and create a commit. Now you have a clean project with no changed files

Now install Breeze, the stack that most closely resembles your requirements

You can see in git what files have been added, what files have been changed, and you can look at those files and decide if any of them are of use to you in your main project. If they are, copy them to your main project

1 like
vincej's avatar
Level 15

@Snapey God knows what I was missing in my understanding. I was fighting with the Breeze installer. I have now a clean Laravel install with Breeze + Blade / Alpine. Also Vite and tailwind. I feel better now! :o) I now understand what you meant by "one line to remove Alpine" . Just delete from the node modules and Bootstrap.js.

Ok , so all I have to do now is add Svelte and inertia, and I should then have an empty but working system. I am still unclear by your instructions above about GIT. The last thing I think i should do is do a Git pull. I would just be pulling all the legacy apps in. I have a Git zip file with all my own code which I think I should just copy and paste into the new clean system. Agreed?

Or have I got that part wrong? At that point I will still have to convert all the Bootstrap css into Tailwind, and fix a conflict with Svelte, which I know how to do.

Snapey's avatar

@vincej The git was meant to show you what the php artisan breeze command had done - nothing more.

You could then replicate these changes in your own project without unconsciously overriding any of your files.

I never intended for you to start a new project which would be the basis for your project going forward.

1 like
vincej's avatar
Level 15

@Snapey I was going to get this clean system working perfectly and then manually copy over my own code into the new system. That works too right? The only problem I might have is when it is all working pushing it up to Git and overriding the old system, as it will effectively be coming from somewhere new.

I think what you are saying is take the old system, rip out what I don't want/need then manually copy over all the breeze files, Vite, Interia etc etc. If I go thtta right, that sounds like work and filled with hazards. No?

jlrdw's avatar

@vincej

  • backup all the "old stuff" to play it safe.
  • Make new project, maybe you did already
  • copy existing models - views - controllers - custom classes (that's still needed) to new project
  • perhaps make a new repo for the newer project (that's up to you to decide)

But I wouldn't do anything until your old app (code) is backed up safely. In case something goes wrong. Backup the database also.

1 like
HichemTab-tech's avatar

@vincej hi I did make a version of breeze so we can use svelte as a template but unfortunately the PR was closed due to "maintainers of laravel don't have time for reviewing the PR" , breh it's a very disrespectful answer, you can check the PR here : github**com/laravel/breeze/pull/396

Although you can still use the fork repo to install breeze with svelte (try to intall the composer package locally or something like that, from this repo) github**.com/HichemTab-tech/breeze

I hope they will reopen the PR someday cuz a lot of svelte lovers want this feature in breeze.

PS: i used ** in links cuz laracast won't allow me to use links.

vincej's avatar
Level 15

Correction - fresh clean install of Laravel 10.

jlrdw's avatar

@vincej breeze will install with blade support, other, vue and react are optional. And it's just my preference to not use it. I don't use any of that stuff.

I write my own css, js, etc.

https://laravel.com/docs/10.x/starter-kits#laravel-breeze

Laravel Breeze's default view layer is made up of simple Blade templates styled with Tailwind CSS. Additionally, Breeze provides scaffolding options based on Livewire or Inertia, with the choice of using Vue or React for the Inertia-based scaffolding.

1 like
vincej's avatar
Level 15

@jlrdw Thanks for that. My challenge is breeze requires me to select an option which is limited to react, view, or livewire. There is no option for none of the above. So I have to now decide do I eliminate the files I have just downloaded through composer or do I select one of the options. I am now faced with having to delete the files that composer downloaded. What a pain

I looked last night at manual authentication and perhaps I do not understand but it looked like a lot of work. However, manually fixing an incorrect breeze. Install also looks like a lot of work. I just wish Taylor did not impose these things on us

What would you do if you were in this position?

vincej's avatar
Level 15

@jlrdw did you see the screenshot I took of my command line. Am only offered a limited set of options. There was nothing allowing me to download breeze without one of these options.

vincej's avatar
Level 15

@Snapey alpine is an option for sure. However, I do not use it. I used JavaScript or Jay query. Installing Alpine means I just have to remove it later.

vincej's avatar
Level 15

@Snapey Well that's the best news I've heard. Is it in composer? Or where shall I look to rip it out?

jlrdw's avatar

@vincej Also you do realize when I said manual Auth, I did not mean you code. Taylor has all copy and paste code already, takes 5 minutes to setup, quicker than this post takes.

You only have to deal with custom redirects, but all kits you have to do that.

But just FYI there.

1 like
vincej's avatar
Level 15

@jlrdw well, that is also outstanding news! Somehow, I got the impression that there was all kinds of coding involved. So where I am right now is rip out the breeze code that composer has installed and go manual. Please forgive me you guys for sounding a little frustrated. This upgrade has given me nothing but headaches. Many thanks.

jlrdw's avatar

@vincej whether you use manual or breeze, I was only sharing my preference.

1 like
vincej's avatar
Level 15

@jlrdw Thanks for your input. It feels to me that I am in a corner. I have no option other than stay with UI or deploy manual authentication. Taylor has engineer Breeze install to use react, livewire or vue.

jlrdw's avatar

@vincej is the documentation wrong about breeze, should allow blade as well?

1 like
jlrdw's avatar

@vincej I just spun up a new laravel 10 app and installed breeze and chose blade, worked without any problem. In mine I had to type blade.

Took 3 minutes. I used composer.

1 like
vincej's avatar
Level 15

@jlrdw well that is great news! When I ran composer I was obligated to make selections as to whic front end and which unit testing s/w I was obliged to use. Please send me the composer command and the php artisan command. you used.

jlrdw's avatar

@vincej

composer require laravel/breeze --dev
php artisan breeze:install

I was obligated to make selections as to whic front end and which unit testing s/w I was obliged to use.

Here I just hit enter, or pick the one you are going to use.

I don't use any of that, I test real world just like in my java ee days. All was setup twice, on one app just tested that everything really worked. Put every aspect through real world test, not mock, but real. Like a test pilot for real flying a plane, not mock, but actually flying.

Edit:

I do a few test to look for places where I can improve code (refactor).

1 like
vincej's avatar
Level 15

@jlrdw Interesting, that is the same as I experienced. I got stuck when I had to select. Did not see you could just hit enter and none would be selected. I will give it one more try.

jlrdw's avatar

@vincej one may be default. But don't worry about alpine and the other, you aren't required to use. Only if you want to.

1 like
vincej's avatar
Level 15

@jlrdw I just gave it one more try. And once again it asked me which front and I wanted. There was no vanilla blade option. So just for fun I selected the "blade with Alpine" then it asked me which unit testing software I wanted. So for fun, I picked pest. Then it finished and I got a whole mountain of errors. I truly give up. I'm gonna delete this whole server and start again fresh. I hate it when software tries to be so-called "helpful" and it ends up just being a mess. Reminds me of working with Microsoft

vincej's avatar
Level 15

@jlrdw I just nuked my project and I am starting again. I think maybe you had a different experience from me because you had an empty Laravel project. Mine had existing Vite, Inertia, Svelte code in it. Who knows. But the one thing I do know, is this should not be this hard. I will let you know how I get on. I have an empty project and I will try to install Breeze without anything else in it. Just vanilla.

vincej's avatar
Level 15

It appears there is no facility for simply adding vanilla breeze. It feels to me like now, I have to spend time ripping out the files that composer downloaded for breeze. And then I have to choose between either continuing with Laravel/UI or ripping that out and going to a manual authentication mode all because Taylor insist that we should be using view or react or live wire.

vincej's avatar
Level 15

I took @snapey advice and decided that I could install Alpine and rip it out with, "one line". Guess what, Good grief, Taylor now requires that I specify which unit test s/w I want. Same Answer - I don't want ANY!!

I'm pulling the plug and rethinking this.

Snapey's avatar

@vincej you would have previously got phpunit with no option, but now theres a choice. In reality this just affects which package gets called when you type php artisan test. Phpunit is always installed.

By the way, never install breeze into anything other than a vanilla framework. I explicitly suggested you don't do this, but you tried it anyway but were then surprised when it blew up !

1 like
vincej's avatar
Level 15

@jlrdw Ok, fresh install. And the identical experience. What do you want: Alpine, Vue, React, Livewire. No option for "blade only" . then ... do you want dark mode,, "No". Then, which Unit test do you want? No option for "none".

So I chose Blade + Alpine nad Pest in the hope I can easily rip those out. What a pain. the one and only good thing is it also automagically installed Tailwind, so no manual install of that.

Do you use Tailwind?

jlrdw's avatar

@vincej No I do not use tailwind, I write my own css code. I have used bootstrap in the past for some pages. I have played with tailwind to test it, but I chose no.

You can still use any css you want. But some things are pre scaffolded with tail wind. You can leave as is and use the tailwind cdn for those pages, otherwise change the css to what you want to use. Your choice.

Edit:

Just remember all these things are optional, you can use what you want to in laravel.

1 like
vincej's avatar
Level 15

@jlrdw Thanks for all your input, it has been invaluable. I am forced to use Tailwind as I have chosen Svelte js framework and there are conflicts between Bootstrap.js and Svelte. I would have prefered to continue with Bootstrap, but here again I am being corralled by choices made by others.

I have hundred of lines of complex JS and I and done with it. I will not rewrite it, as it is too much. The primary benefit of using Svelte is that it is not a JS Framework like Vue but rather a JS compiler. additionally it does remove the burden of dealing directly with the DOM, which is the biggest PAIN going, especially when you have complex tables to deal with.

Cheers!!

vincej's avatar
Level 15

@jlrdw btw - I will now have to now reinstall Svelte, and Inertia. I have truly had enough of JS and JQuery.

vincej's avatar
Level 15

@jlrdw Yup - can see what you mean. I am no JS expert, but for me Svelte syntax is by far the easiest to use. Way better than Vue and React. It does offer some Svelte syntactical sugar to allow for reactivity and managing state. I will just be glad to get away from that effing DOM!

After your recommendation I have tried using fetch. Very clean and straight forward.

Please or to participate in this conversation.