| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Distilleries\Expendable\States; |
||
| 3 | trait DatatableStateTrait { |
||
| 4 | |||
| 5 | /** |
||
| 6 | * @var \Distilleries\DatatableBuilder\EloquentDatatable $datatable |
||
| 7 | * Injected by the constructor |
||
| 8 | */ |
||
| 9 | protected $datatable; |
||
| 10 | |||
| 11 | |||
| 12 | // ------------------------------------------------------------------------------------------------ |
||
| 13 | // ------------------------------------------------------------------------------------------------ |
||
| 14 | // ------------------------------------------------------------------------------------------------ |
||
| 15 | |||
| 16 | 8 | public function getIndexDatatable() |
|
| 17 | { |
||
| 18 | 8 | $this->datatable->build(); |
|
| 19 | 8 | $datatable = $this->datatable->generateHtmlRender(); |
|
| 20 | 8 | $this->layoutManager->add([ |
|
| 21 | 8 | 'content'=>view('expendable::admin.form.state.datatable')->with([ |
|
| 22 | 8 | 'datatable' => $datatable |
|
| 23 | ]) |
||
| 24 | ]); |
||
| 25 | |||
| 26 | 8 | return $this->layoutManager->render(); |
|
| 27 | } |
||
| 28 | |||
| 29 | // ------------------------------------------------------------------------------------------------ |
||
| 30 | |||
| 31 | 6 | public function getDatatable() |
|
| 37 | } |
||
| 38 | } |