I am trying to catch the problem associated with a specific answer to laravel, so I use the after filter to record all activity, but I cannot figure out how to dump the request and response information to the log.
App::after( function ($request, $response) { Log::info('access.log', array('request' => $request->headers, 'response' => $response->headers)); } );
This code does not provide information about the status of the code for the answer that interests me the most.
Is there any way to see what comes out at the final stage of transferring information to a web server? Something like that?
HTTP/1.1 200 OK Date: Tue, 25 Nov 2014 22:35:17 GMT Server: Apache/2.2.14 (Ubuntu) X-Powered-By: PHP/5.4.34-1+deb.sury.org~lucid+1 Cache-Control: no-cache, max-age=0 Expires: Tue, 25 Nov 2014 22:35:17 GMT Content-Type: application/json Via: 1.1 localhost:8080 Vary: Accept-Encoding Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Length: 59 {"success":true,"result":{"min":5.7,"mean":9.7,"max":14.2}}
source share