Laravel Breeze Now With Inertia.js
Published on by Paul Redmond
Laravel released an Inertia.js option for the Laravel Breeze starter kit you can use to create a minimal starting point for building Laravel applications with authentication:
For those who wanted it - shipped the @inertiajs option for Laravel Breeze. 🚢 pic.twitter.com/8CqcG2ssIe
— Taylor Otwell 💎 (@taylorotwell) February 17, 2021
The --inertia
flag offers an optional frontend implementation that scaffolds Inertia.js, Vue, and PHP code you'll need to get started:
# New option to use Intertiaphp artisan breeze:install --inertianpm installnpm run dev # Default Breeze install uses blade templatesphp artisan breeze:install
If you'd like to learn more, I'd suggest starting a new Laravel app and installing breeze with the --inertia
flag. If you're curious, you can see all the stubs copied into your project during a breeze install
. Stubs include configuration for Tailwind, Webpack, Laravel routes, all the JS you'll need for authentication views, and controllers.
You can see the details of this feature by checking out Pull Request #44 to the laravel/breeze repo. It's also worth reemphasizing that all of this scaffolding is optional. Laravel doesn't require that you use Inertia, Tailwind, or any other tool.