为什么日志不显示API发送的请求信息?

After a user made a payment the API the configured URL in the API backoffice. Its a GET request. The url configured in the backoffice is like:

 http://....ngrok.io/mbpay/notification-callback

So I have this route:

Route::get('/mbpay/notification-callback', [
    'uses' => 'PaymentController@notifications',
    'as'   =>'mb.notifications'
]);

And the method to log the result:

 public function notifications(Request $request)
    {
        Log::info('request info: ' . var_export($request->all(), true));
    }
}

But its not working, the log is not showing nothing, do you know what can be the issue?

Few things I´d suggest when routing is not working as expected.

  • Remove bootstrap/cache/routes.php
  • php artisan route:cache

For your specific case:

  • Make sure notifications returns something as simple as a "hello"
  • Does your ngrok response catches this hello response?