[Vuejs]-How can I log what is going wrong in my controller

0👍

your register method of the controller is not accessible because of the auth middleware. so you are getting not authorized error. make it accessible without authorization. in the constructor method of the controller change this line like below.

$this->middleware('auth:api', ['except' => ['login', 'register']]);

login and register are controller’s method which will be now accessible without authorization.

Leave a comment