-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'tokenable_id' cannot be null #75
Comments
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. |
I am experiencing the same issue, could not find anything on the channels you suggested, so have created a new question on stackoverflow: am putting this here just in case others see the same issue and will have somewhere to look. |
|
I had the same issue. In my case, I forgot to save the user ($user->save()) before creating his token lol... then, worked. |
i have this same error.. |
In my case, I had to save the user before creating his token.
|
For me the error wars my primary key wasn't id but username, in the model file app/Models/User.php and everything works well |
thanks it thats works for me |
I were also struggling with the same issue what I were doing wrong was I have the different table name instead of user -> tw_user and the problem were I set the user_id as the primary key instead of id. so there were no id column present. I rename the user_id with the id and it worked for me. Late answer: but may be help someone else. |
i had the same error and worked with |
I had the same problem , |
I am using airlock for authentication and when i try to create a token it gives me this error
Integrity constraint violation: 1048 Column 'tokenable_id' cannot be null (SQL: insert into
personal_access_tokens(
name,
token,
abilities,
tokenable_id,
tokenable_type,
updated_at,
created_at) values (admin@email.com, 00f23c417988d8fef36a6275db0a6346acfe6c14004f4bc0d086d9a6249e4e0f, ["*"], ?, Modules\User\Entities\User, 2020-02-18 12:46:10, 2020-02-18 12:46:10))
Any idea why this happen ?
I am using Laravel Framework 6.15.0
The text was updated successfully, but these errors were encountered: