dont show profiler bar on ajax request.

This commit is contained in:
Taylor Otwell 2012-04-03 20:22:01 -05:00
parent 02db986627
commit 507bba60ca
1 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,7 @@
use Laravel\File; use Laravel\File;
use Laravel\Event; use Laravel\Event;
use Laravel\Config; use Laravel\Config;
use Laravel\Request;
class Profiler { class Profiler {
@ -20,9 +21,12 @@ class Profiler {
* @return string * @return string
*/ */
public static function render() public static function render()
{
if ( ! Request::ajax())
{ {
return render('path: '.__DIR__.'/template'.BLADE_EXT, static::$data); return render('path: '.__DIR__.'/template'.BLADE_EXT, static::$data);
} }
}
/** /**
* Add a log entry to the log entries array. * Add a log entry to the log entries array.