laravel / passport

Laravel Passport provides OAuth2 server support to Laravel.

Home Page:https://laravel.com/docs/passport

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Hi @uintaam. This will be fixed in today's release: #1705

This appears to be happening with scopes now as well.