Laravel Breeze is a new and surprising laravel package developed by Taylor Otwell himself and released just a few days ago.
Surprise package release. When? Now! Laravel Breeze. If Jetstream overwhelmed you and you need something simpler for now. Blade + Tailwind only. Every route and controller exported directly to your application. Same beautiful Jetstream style UI. https://t.co/V3QMrVzY0p 🌴🌊🌴— Taylor Otwell 🛸 (@taylorotwell) November 9, 2020
What this package provides is the more low-level auth scaffolding UI using Tailwind and AlpineJS, which the old
laravel-ui auth scaffolding is using either Bootstrap, Vue or React.
The best way to try this package is by using a new and freshly created laravel app and installing the package using:
composer require laravel/breeze --dev
and then scaffold the auth feature using
php artisan breeze:install
and then also make sure to build the assets by:
npm install npm run dev
and then the login and register are ready to use.
My plan for this post is to make some
feature/unit tests to test the login and register functionality as well as improving my
PHPUnit testing skill. But
laravel/breeze already provides all the test suites for us.
Breeze even exports a set of nice tests to your application... ✅ pic.twitter.com/zxf9eVzLJu— Taylor Otwell 🛸 (@taylorotwell) November 9, 2020
So, I will learn from it instead.
To enable and try the
phpunit, you can see in
phpunit.xml file and uncomment these lines:
... <server name="DB_CONNECTION" value="sqlite"/> <server name="DB_DATABASE" value=":memory:"/> ...
and then you can run all tests using:
php artisan test
Laravel Breeze is a great starting point for your laravel project if you are already comfortable using Tailwind and the purge configuration is already set to use if you build your assets for production (
npm run prod).
Have fun exploring this package.