How to install a breeze Laravel authentication package
Laravel is used to ship authentication with the installation package. However, authentication is now provided as a part of breeze for Laravel 8.
If you have Laravel 8 up and running, you will need to run a few commands to get your breeze authentication package running smoothly.
- First, run the
composercommand. This will install thebreezepackage into your application, as shown below:
composer require laravel/breeze --dev
- You can use either
reactorvueto serve as your UI, which you can select while thebreezepackage installs.
php artisan breeze:install vue
php artisan breeze:install react
- The next step is to install the necessary dependencies using
npm, as shown below:
npm install //installs the node package for which UI you've chosen
npm run dev
- Finally, you can set up your database for the authentication package by running the following command:
php artisan migrate
If all the steps are done correctly, you can visit the /register path to register a new user to your application and visit /login to login registered users.
You can find your defined routes in routes/auth.php.