Try this tutorial it might help https://www.youtube.com/watch?v=OJtGeqgXwfo
How can i retrieve allready existing token?
$user->token() return null.
I don't use passport and without more code, I can't identify what problems you have in your code.
So please watch that tutorial or find another and move step by step and you will eventually find where the problem is.
Also, create a minimal example with your problem uploaded on github or gitlab and post the link here so that everybody can help more.
As a final idea have you tried to
dd in the controller where you create the token?
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.