class AuthenticateWithBasicAuth (View source)

Properties

protected Factory $auth

The guard factory instance.

Methods

void
__construct(Factory $auth)

Create a new middleware instance.

static string
using(string|null $guard = null, string|null $field = null)

Specify the guard and field for the middleware.

mixed
handle(Request $request, Closure $next, string|null $guard = null, string|null $field = null)

Handle an incoming request.

Details

void __construct(Factory $auth)

Create a new middleware instance.

Parameters

Factory $auth

Return Value

void

static string using(string|null $guard = null, string|null $field = null)

Specify the guard and field for the middleware.

Parameters

string|null $guard
string|null $field

Return Value

string

mixed handle(Request $request, Closure $next, string|null $guard = null, string|null $field = null)

Handle an incoming request.

Parameters

Request $request
Closure $next
string|null $guard
string|null $field

Return Value

mixed

Exceptions

UnauthorizedHttpException

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.