Error attribute [grant_types] either does not exist or was not retrieved for App\Passport\Models\Client
uintaam opened this issue · comments
Passport Version
11.10.0
Laravel Version
10.40.0
PHP Version
8.2.13
Database Driver & Version
MySQL 8
Description
After enabling Model::preventAccessingMissingAttributes, we get this error attribute [grant_types] either does not exist or was not retrieved for model [App\Passport\Models\Client]. This field doesn't appear to be part of the migration but the Client Model has 'grant_types' => 'array',
as a cast.
Steps To Reproduce
Calling $user->createToken('device name');
with Model::preventAccessingMissingAttributes();
called in the AppServiceProvider
This appears to be happening with scopes now as well.