** Hey, Lara devs **
Today I am going to share something with you guys.
Maybe someday it will help you to resolve.
I was working with Laravel Project with sanctum.
We were preparing to go live. And I cleaned the full DB and created a new database user and new database at Digital Ocean Droplet with Linux Ubuntu 20.04.
After completing the user & database creation. I imported My Local Fresh SQL to the server new database.
In the meantime somehow id primary key was removed and the data type turn into big-int also auto-increment credentials were removed.
For that, Records are created without default id increment. ID was 0 for every-rows.
So, whenever I was trying to log in through API. It's successfully generating API Tokens also saving inside personal_access_tokens with id 0. I was also able to parse tokens.
When, I was passing the token with Bearer to get my profile information. And, I was getting a wired response like 405 Method Not allowed exception.
I checked locally more than 10 times , everything is working. Also, I tried to down and up Laravel application at production mood.
Nothing worked at all.
After long period, Once I just dropped the id column and created a new id column with primary index & auto-increment.
It works perfectly now.
Top comments (0)