Hi @rizwan5019 , Can you kindly provide the error? That should give us more information what maybe is going wrong
May 25, 2022
4
Level 1
Laravel REST API with sanctum Authentication | Delete current user token
I am working on CRUD rest api in laravel. I am facing a issue on Logout function, when i tried auth()->user()->tokens()->delete(); It showing error on tokens(). I have added HasApiTokens in User Model but it still not working for me. Can any one help me?. Thanks in advance.
Please or to participate in this conversation.