当我使用护照包时这样做,
$success['token'] = $users->createToken('MyApp')->accessToken;
我将在此代码中处理错误:
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),
]);
}
错误文字:
Trying to get property 'id' of non-object
为什么clinet variabale有null ??
答案 0 :(得分:2)
我升级到^ 3.0时遇到了同样的问题。我运行了php artisan护照:install --force来重新生成密钥,并且有效。