App\Http\Middleware\QuarxApi::handle PHP Method

handle() public method

Handle an incoming request.
public handle ( Illuminate\Http\Request $request, Closure $next ) : mixed
$request Illuminate\Http\Request
$next Closure
return mixed
    public function handle($request, Closure $next)
    {
        if (Gate::allows('quarx-api')) {
            return $next($request);
        }
        return response('Unauthorized.', 401);
    }
QuarxApi