Laravel Jetstream 4.0 with Livewire 3 support
Published on by Eric L. Barnes
Laravel Jetstream v4.0 is now released and includes support for the just-released Livewire v3.
Jetstream Upgrading Process
Upgrading to Jetstream 4.0 is pretty straightforward, but it has a few steps outlined on the upgrade guide. Here is a brief overview:
Update composer.json
Change your jetstream line in composer.json to:
"laravel/jetstream": "^4.0",
Then run composer update
Update your Alpine Scripts
Livewire 3 ships with Alpine by default, so you do not need to include it in your application's resources/js/app.js
file.
You should include @livewireStyles
and @livewireScripts
in your application's resources/views/layouts/guest.blade.php
file since Alpine is used by "guest" components published by Jetstream:
<!-- Scripts --> @vite(['resources/css/app.css', 'resources/js/app.js'])++ <!-- Styles -->+ @livewireStyles </head> <body> <div class="font-sans text-gray-900 dark:text-gray-100 antialiased"> {{ $slot }} </div>++ @livewireScripts </body>
Conclusion
Developers interested in getting started with these new features are encouraged to consult the official Laravel Jetstream documentation and the Livewire documentation for comprehensive guides and tutorials.
Eric is the creator of Laravel News and has been covering Laravel since 2012.