Error 502 trying to use Laravel Sanctum with custom model


I’m using Laravel sanctum to authenticate my API, but i’m not using the default laravel User model, I’ve built a model to separate my App customers in another table called Customer. To this to work I did the alterations bellow

Custom model Customer.php

Config file auth.php

Config file sanctum.php

Route file api.php

When trying to access an protected sanctum route /user it gives me the 502 error

enter image description here

Source: Laravel

Categorised as laravel, laravel-sanctum, nginx, php Tagged , , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us