Search code examples
phplaravelapiphpstormxdebug

How to debug Laravel API request from mobile client?


I am now developing mobile app that integrated with web service. Web service is now developing on Laravel framework.

The problem was that when I tried to debug request on Laravel project from mobile app, I couldn't handle it.

I am using PhpStorm as IDE for developing web service. For debug I've made a new Run/Debug Configuration of "PHP HTTP Request" type for this API request and executed debug.

When I get debug point, it shows:

"*{"error":"token_not_provided"}*"

Maybe I used middleware jwt.auth so if I tried to debug it, it needed token.

How can I handle this problem so I can debug api rest request from mobile app?

I use Xdebug for php debugging.

Hope to get response soon from professional developers.


Solution

  • you have to set your url in $except array in the App/Http/Middleware/VerifyCsrfToken Class