laravel / sanctum

Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.
https://laravel.com/docs/sanctum
MIT License
2.75k stars 296 forks source link

Issue with overriding default model #504

Closed Alyka closed 7 months ago

Alyka commented 7 months ago

Sanctum Version

4.x

Laravel Version

10.x

PHP Version

8.x

Database Driver & Version

No response

Description

Overriding the default model throws an error

Laravel\\Sanctum\\NewAccessToken::__construct(): Argument #1 ($accessToken) must be of type Laravel\\Sanctum\\PersonalAccessToken, Core\\Models\\SanctumModel given, called in /var/www/html/vendor/laravel/sanctum/src/HasApiTokens.php on line 52

Steps To Reproduce

driesvints commented 7 months ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.