vdhoangson/laravel-basic-auth

The Laravel Basic Auth.

Fund package maintenance!
vdhoangson

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

Type:project

v1.1 2025-06-04 02:58 UTC

This package is auto-updated.

Last update: 2025-06-04 02:59:00 UTC


README

GitHub tag (latest by date) GitHub Packagist

Installation

You can install this package by composer:

composer require vdhoangson/laravel-basic-auth

Implementation

Use this in routes/web.php

Route::middleware(['basic-auth'])->group(function () {
    //All the routes are placed in here
    Route::get('/home', 'DashboardController@dashboard');
});

OR

Route::get('/home', 'DashboardController@dashboard')->middleware('basic-auth');

Configures

BASIC_AUTH_USERNAME=
BASIC_AUTH_PASSWORD=
BASIC_AUTH_REALM=