Hi,
I'm trying to build an API for already existing PHP system which uses mysql database served on different server, let's call it: DB_API.
I also need to protect it using laravel:sanctum in order to manage tokens and authenticate requests, but my problem is that I need all sanctum actions (generating tokens and authenticating requests) to be done on separate database, let's call it: DB_AUTH.
What I did so far is:
The result is when calling the protected API endpoint it's not using the DB_AUTH connection, but the DB_API connection which failed to find the personal_access_tokens table and that is correct cause this table isn't defined in the this database.
Any guidance is appreciated,
Best regards,
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community