Exemplo n.º 1
0
 /**
  * Get the rendered contents of the Profiler.
  *
  * @param  Response  $response
  * @return string
  */
 public static function render($response)
 {
     // We only want to send the profiler toolbar if the request is not an AJAX
     // request, as sending it on AJAX requests could mess up JSON driven API
     // type applications, so we will not send anything in those scenarios.
     if (!Request::ajax()) {
         return render('path: ' . __DIR__ . '/template' . BLADE_EXT, static::$data);
     }
 }
Exemplo n.º 2
0
 /**
  * Get the rendered contents of the Profiler.
  *
  * @param  Response  $response
  * @return string
  */
 public static function render($response)
 {
     // We only want to send the profiler toolbar if the request is not an AJAX
     // request, as sending it on AJAX requests could mess up JSON driven API
     // type applications, so we will not send anything in those scenarios.
     if (!Request::ajax()) {
         static::$data['memory'] = get_file_size(memory_get_usage(true));
         static::$data['memory_peak'] = get_file_size(memory_get_peak_usage(true));
         static::$data['time'] = number_format((microtime(true) - LARAVEL_START) * 1000, 2);
         return render('path: ' . __DIR__ . '/template' . BLADE_EXT, static::$data);
     }
 }