To install Laravel Breeze when you already have Inertia and Svelte installed, you can follow these steps:
- Install Laravel Breeze using Composer:
composer require laravel/breeze --dev
- Publish the Breeze assets:
php artisan breeze:install
- Update your
webpack.mix.jsfile to include the necessary Breeze assets. For example, if you're using Svelte, you can add the following lines to yourwebpack.mix.jsfile:
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.postCss('resources/css/app.css', 'public/css', [
//
])
.svelte();
- Run the Laravel Mix build command to compile your assets:
npm run dev
- Finally, you can include the Breeze blade files in your views. For example, you can add the following line to your
app.blade.phpfile:
@include('vendor.breeze.auth-layout')
With these steps, you should have Laravel Breeze installed and integrated with your existing Inertia and Svelte setup.