Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created January 15, 2014 23:01
Show Gist options
  • Select an option

  • Save zeroeth/8446508 to your computer and use it in GitHub Desktop.

Select an option

Save zeroeth/8446508 to your computer and use it in GitHub Desktop.
Laravel request debugging.
<?php
use Illuminate\Support\Facades\Log;
/**
* Debug request information.
*/
Route::filter('debug_info', function( $route, $request ) {
Log::debug("REQUEST", array(
"route"=>$route->getAction(),
"session"=>Session::all(),
"header"=>$request->header())
);
});
Route::when('*', 'debug_info');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment