예제 #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     // Output start.
     $this->info('Clearing Anbu request history...');
     // Clear history using repository.
     $this->repository->clear();
     // Output end.
     $this->info('Done!');
 }
예제 #2
0
파일: History.php 프로젝트: zc1415926/anbu
 /**
  * Executed during the profiler request cycle.
  *
  * @return void
  */
 public function live()
 {
     // Bind all requests to data array.
     $history = $this->repository->all();
     // Get pagination component.
     $paginator = $this->app->make('paginator');
     // Create paginator.
     $this->data['history'] = $paginator->make($history, count($history), 10);
     // Set badge to count of storage records.
     $this->badge = count($this->data['history']);
 }
예제 #3
0
파일: Profiler.php 프로젝트: Crinsane/anbu
 /**
  * Storage module data using the repository.
  *
  * @return Storage
  */
 protected function storeModuleData()
 {
     // Create new storage record.
     $storage = new Storage();
     // Store the current URI.
     $storage->uri = $this->getCurrentRequestUri();
     // Set the request time.
     $storage->time = microtime(true) - LARAVEL_START;
     // Fetch module storage array and set on record.
     $storage->storage = base64_encode(serialize($this->fetchStorage()));
     // Use the repository to save the storage.
     $this->repository->put($storage);
     // Return the storage object.
     return $storage;
 }