when i using passport package After doing this,
$success['token'] = $users->createToken('MyApp')->accessToken;
I'll deal with error in this code :
protected function createRequest($client, $userId, array $scopes)
{
return (new ServerRequest)->withParsedBody([
'grant_type' => 'personal_access',
'client_id' => $client->id,
'client_secret' => $client->secret,
'user_id' => $userId,
'scope' => implode(' ', $scopes),
]);
}
text of error :
Trying to get property 'id' of non-object
why clinet variabale has null ??
$client
because the issue is that$client
-- whatever that is -- does not have theid
assigned.createRequest()
defined?