Why do we need laravel breeze?
- Laravel Breeze helps build simple Laravel applications with lightweight authentication.
- Laravel Breeze is styled with Tailwind CSS.
- We can also customize the view blade files as per our requirements.
Installation requirement :
For installing Laravel breeze we need this basic requirement Php >= 7.3 or >= 8.0
For installing breeze use this command
Install Node :
After installing breeze, we need to install the node using this command
Npm install && npm run dev
Now installation is finished, after that, we can start the database connection.
Database connection and migration :
For database connection, we need to save changes in the .env file
after that run this command
Php artisan migrate
After running this command Database is migrated successfully.
File Structure :
Route file :
If we want to change any route then the route file path is “routes/auth.php”, you can go to this path and change the URL.
Controller :
If we want to change any controller or any functionality, we can go to this path “app\Http\Controllers\Auth”.
View :
If we want to change any design so we can go this path resources/view/auth all view/ blade files stored here.
Testing :
Now that all these processes are done, we can check the laravel breeze using the browser
using this command
Php artisan serve URL – 127.0.0.1:8000
When you click on “register” the below page will open
When you click on “login” screen, the below page will open
By using both of them, we can register new users and log in successfully.
After Logging in successfully, we can jump to the dashboard screen.
Comparison Laravel/ui vs Laravel Breeze :
Laravel/ui :
- If we want to use vue and react in our application then we need the laravel/ui package.
- It provides an authentication view with bootstrap.
Laravel Breeze :
- Laravel Breeze is a small version of the jetstream.
- It uses tailwind instead of bootstrap.
Conclusion
Laravel breeze provides very powerful authentication and we can also customize it as per our requirements. Hope this blog is helpful for a basic understanding of laravel breeze.