Last active
August 14, 2019 09:12
-
-
Save fhulufhelo/c7c6d57c9f26439d30e5e3299a881299 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Illuminate\Http\Concerns; | |
// InteractsWithInput | |
/** | |
* Get the user for the incoming request. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @return mixed | |
*/ | |
public function user(Request $request) | |
{ | |
if ($request->bearerToken()) { | |
return $this->authenticateViaBearerToken($request); | |
} elseif ($request->cookie(Passport::cookie())) { | |
return $this->authenticateViaCookie($request); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment