From 507bba60caf3a5fe1ec31604943bfa38b12e79d9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 3 Apr 2012 20:22:01 -0500 Subject: [PATCH] dont show profiler bar on ajax request. --- laravel/profiling/profiler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/laravel/profiling/profiler.php b/laravel/profiling/profiler.php index 5acb3f6d..ef8ae252 100644 --- a/laravel/profiling/profiler.php +++ b/laravel/profiling/profiler.php @@ -4,6 +4,7 @@ use Laravel\File; use Laravel\Event; use Laravel\Config; +use Laravel\Request; class Profiler { @@ -21,7 +22,10 @@ class Profiler { */ public static function render() { - return render('path: '.__DIR__.'/template'.BLADE_EXT, static::$data); + if ( ! Request::ajax()) + { + return render('path: '.__DIR__.'/template'.BLADE_EXT, static::$data); + } } /**