Skip to content

Instantly share code, notes, and snippets.

@MrJmpl3
Created August 25, 2019 23:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrJmpl3/a407f8b2b017b6fff65652dec8a74270 to your computer and use it in GitHub Desktop.
Save MrJmpl3/a407f8b2b017b6fff65652dec8a74270 to your computer and use it in GitHub Desktop.
Testing Login of Laravel Passport without lose env
request()->request->add([
'grant_type' => 'password',
'client_id' => env('PASSPORT_CLIENT_ID'),
'client_secret' => env('PASSPORT_CLIENT_SECRET'),
'username' => $this->username,
'password' => $this->password,
'scope' => '*',
]);
$request = Request::create(env('APP_URL') . '/oauth/token', 'POST');
return Route::dispatch($request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment