| Package Data | |
|---|---|
| Maintainer Username: | tecbeast |
| Package Create Date: | 2017-05-10 |
| Package Last Update: | 2017-06-04 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-02 15:16:35 |
| Package Statistics | |
|---|---|
| Total Downloads: | 1,126 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 1 |
| Total Open Issues: | 0 |
A middleware for Laravel 5.1+ where you can use basic auth with any webserver. Depending only on one config file.
composer require tecbeast/basic-auth-with-env
Add the service provider to the providers array in config/app.php:
'providers' => [
...
TecBeast\BasicAuthWithEnv\BasicAuthServiceProvider::class,
],
Add the middleware to the middleware array (for global, otherwise add to route or group (Laravel 5.2+)) in app/Http/Kernel.php:
protected $middleware = [
...
\TecBeast\BasicAuthWithEnv\Middleware\BasicAuth::class,
];
Publish the config to your application:
php artisan vendor:publish --provider="TecBeast\BasicAuthWithEnv\BasicAuthServiceProvider"