rupadana / filament-api-service

A simple api service for supporting filamentphp
https://filamentphp.com/plugins/rupadana-api-service
MIT License
143 stars 28 forks source link

[Bug]: Call to undefined method App\Models\User::createToken() #60

Closed zenepay closed 5 months ago

zenepay commented 5 months ago

What happened?

Call to undefined method App\Models\User::createToken() Try to create the Token but it seems this function is not existed in User model. Do you have to entend any traits?

How to reproduce the bug

When creating token from Token resource

Package Version

3.2

PHP Version

8.2

Laravel Version

11

Which operating systems does with happen with?

Linux

Notes

No response

zenepay commented 5 months ago

I got it . I need to put HasApiToken to User Model class User extends Authenticatable implements FilamentUser { use HasApiTokens;

zenepay commented 5 months ago

If this should be in the document, it would be good.