Exemple #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!');
 }
Exemple #2
0
 /**
  * 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']);
 }
Exemple #3
0
 /**
  * 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;
 }