public function getIndex()
 {
     $path = Config::get('debugbar.storage.path');
     if (!file_exists($path)) {
         return 'Debug directory does not exist: ' . $path;
     }
     $storage = new FileStorage($path);
     $files = $storage->find([], 1);
     $id = empty($files) ? null : $files[0]['id'];
     $data = empty($files) ? '' : $storage->get($id);
     Debugbar::setData($data);
     Debugbar::setCurrentRequestId($id);
     $renderer = Debugbar::getJavascriptRenderer();
     $renderer->setOpenHandlerUrl('debugbar/open-handler');
     return View::make('laravel-debugbar::debugbar', ['renderer' => $renderer]);
 }
예제 #2
0
 /**
  * overide methode save
  * @param $id
  * @param $data
  */
 public function save($id, $data)
 {
     $d = array();
     foreach ($data as $key => $value) {
         if (in_array($key, $this->collectorsToSave)) {
             $d[$key] = $value;
         }
     }
     parent::save($id, $d);
 }