Meh
1 month ago

Sanctum personal_access_tokens table does not exist

Posted 1 month ago by Meh

I have 2 laravel 7 applications on my localhost:

http://api.localhost

  • uses sanctum for token based auth
  • mysql database (api) on 127.0.0.1

http://demo.localhost

  • simple web app
  • mysql database (demo) on 127.0.0.1

When accessing my api endpoints via postman everything is happy, all works. However when I try requesting any route on api.localhost from demo.localhost using Guzzle i get the following exception message:

"Base table or view not found: 1146 Table 'demo.personal_access_tokens' doesn't exist"

How is this even possible? Why is the api application trying to connect to the demo database.

i have already reviewed this following post, tried the suggestion there without luck. https://laracasts.com/discuss/channels/laravel/customizing-laravel-sanctum-model

Any help would be much appreciated, thanks

Please sign in or create an account to participate in this conversation.