composer require rtmatt/htpasswd
Add the following to the 'providers' array in config/app.php
RTMatt\Htpasswd\Providers\HtpasswdServiceProvider::class,
To generate password guard
php artisan htpasswd:make <username>
This will generate your .htpasswd file and .htaccess entries. Both the username and password will be the name you enter as an argument for the artisan command.
To remove password guard
php artisan htpasswd:delete
This will remove your .htpasswd file and remove the auth entries from .htaccess