· 6 years ago · Sep 06, 2019, 09:40 AM
1request()->request->add([
2 'grant_type' => 'password',
3 'client_id' => env('PASSPORT_CLIENT_ID'),
4 'client_secret' => env('PASSPORT_CLIENT_SECRET'),
5 'username' => $this->username,
6 'password' => $this->password,
7 'scope' => '*',
8]);
9
10$request = Request::create(env('APP_URL') . '/oauth/token', 'POST');
11
12return Route::dispatch($request);