Error 502 trying to use Laravel Sanctum with custom model

Published

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
https://ghostbin.com/Opey3

Config file auth.php
https://ghostbin.com/BsYSb

Config file sanctum.php
https://ghostbin.com/yDlts

Route file api.php
https://ghostbin.com/UZu1L

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

enter image description here

Source: Laravel

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

Answers

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
faq