| 1 | <?php |
||
| 9 | class TotalRow extends AbstractTool |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Builder |
||
| 13 | */ |
||
| 14 | protected $query; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $columns; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * TotalRow constructor. |
||
| 23 | * |
||
| 24 | * @param Builder $query |
||
| 25 | * @param array $columns |
||
| 26 | */ |
||
| 27 | public function __construct($query, array $columns) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get total value of current column. |
||
| 36 | * |
||
| 37 | * @param string $column |
||
| 38 | * @param mixed $display |
||
| 39 | * |
||
| 40 | * @return mixed |
||
| 41 | */ |
||
| 42 | protected function total($column, $display) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Render total-row. |
||
| 59 | * |
||
| 60 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
| 61 | */ |
||
| 62 | public function render() |
||
| 76 | } |