src/Api/Controllers/LoginController.php
protected function createRequest($client, $userId, $request, array $scopes)
    {
        return (new ServerRequest)->withParsedBody(
            ['grant_type' => 'password',
            'client_id' => $client->id,
            'client_secret' => $client->secret,
            'username' => $request->get('email'),
            'password' => $request->get('password'),
            'user_id' => $userId,
            'scope' => implode(' ', $scopes)]
        );
    }
protected function createRequest($client, $userId, $request, array $scopes)
    {
        return (new ServerRequest)->withParsedBody(
            ['grant_type' => 'password',
            'client_id' => $client->id,
            'client_secret' => $client->secret,
            'username' => $request->get('email'),
            'password' => $request->get('password'),
            'user_id' => $userId,
            'scope' => implode(' ', $scopes)]
        );
    }
protected function createRequest ( $ client , $ userId , $ request , array $ scopes ) { return ( new ServerRequest ) -> withParsedBody ( [ 'grant_type' => 'password' , 'client_id' => $ client -> id , 'client_secret' => $ client -> secret , 'username' => $ request -> get ( 'email' ) , 'password' => $ request -> get ( 'password' ) , 'user_id' => $ userId , 'scope' => implode ( ' ' , $ scopes ) ] ) ; }
Create a request instance for the given client.

@param  \Laravel\Passport\Client  $client
@param  mixed  $userId
@param  array  $scopes
@return \Zend\Diactoros\ServerRequest
Create a request instance for the given client .