How to Auth::check() user on Laravel with API calls

前端 未结 4 804
[愿得一人]
[愿得一人] 2021-01-21 07:54

I\'m using VueJS in my front-end, so I have this API call somewhere in the front-end code:

let products = axios.get(\'api/products\');


4条回答
  •  天命终不由人
    2021-01-21 08:04

    Are you sending auth token because when we write the API we need to deal with auth token and not with Auth::check(). You need to send auth token with user id at the time of api call and verify that details to proceed.

提交回复
热议问题