src/Guards/TokenGuard.php
public function user(Request $request)
    {
        if ($request->bearerToken()) {
            return $this->authenticateViaBearerToken($request);
        } elseif ($request->cookie(Passport::cookie())) {
            return $this->authenticateViaCookie($request);
        }
    }
public function user(Request $request)
    {
        if ($request->bearerToken()) {
            return $this->authenticateViaBearerToken($request);
        } elseif ($request->cookie(Passport::cookie())) {
            return $this->authenticateViaCookie($request);
        }
    }
public function user ( Request $ request ) { if ( $ request -> bearerToken ( ) ) { return $ this -> authenticateViaBearerToken ( $ request ) ; } elseif ( $ request -> cookie ( Passport :: cookie ( ) ) ) { return $ this -> authenticateViaCookie ( $ request ) ; } }
Get the user for the incoming request.

@param  \Illuminate\Http\Request  $request
@return mixed
Get the user for the incoming request .