Author: ARCANEDEV (arcanedev.maroc@gmail.com)
Inheritance: extends Arcanedev\LogViewer\Bases\Table
コード例 #1
0
 /**
  * Prepare footer
  *
  * @param  StatsTable  $stats
  *
  * @return array
  */
 private function prepareFooter(StatsTable $stats)
 {
     $files = ['count' => count($stats->rows()) . ' log file(s)'];
     return $files + $stats->footer();
 }
コード例 #2
0
ファイル: Factory.php プロジェクト: 100448facens/LogViewer
 /**
  * Get logs statistics table.
  *
  * @param  string|null  $locale
  *
  * @return \Arcanedev\LogViewer\Tables\StatsTable
  */
 public function statsTable($locale = null)
 {
     return StatsTable::make($this->stats(), $this->levels, $locale);
 }
コード例 #3
0
 /**
  * Prepare chart data.
  *
  * @param  \Arcanedev\LogViewer\Tables\StatsTable  $stats
  *
  * @return string
  */
 protected function prepareChartData(StatsTable $stats)
 {
     $totals = $stats->totals()->all();
     return json_encode(['labels' => Arr::pluck($totals, 'label'), 'datasets' => [['data' => Arr::pluck($totals, 'value'), 'backgroundColor' => Arr::pluck($totals, 'color'), 'hoverBackgroundColor' => Arr::pluck($totals, 'highlight')]]]);
 }