我需要在从安卓应用程序调用时调试 laravel 5.4 网络服务代码



我需要调试我的 PHP 网络服务代码,因为它从 android 应用程序调用 我正在使用 laravel 5.4。 因此,当移动应用程序向我的 Web API 发送 POST 请求时,我需要检查 post 数组以找出来自 android 应用程序的数据的形状,所以是否有任何方法可以做到这一点

您可以使用Laravel Log服务 https://laravel.com/docs/5.1/errors#logging

喜欢

Public function store(Request $request) { 
  Log::debug($request->all()); 
}

如果您愿意,您可以连接一些额外的信息。

你可以阅读这个给定的链接https://laravel.com/docs/5.4/errors

/**
 * Report or log an exception.
 *
 * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
 *
 * @param  Exception  $exception
 * @return void
 */
public function report(Exception $exception)
{
    if ($exception instanceof CustomException) {
        //
    }
    return parent::report($exception);
}

最新更新