| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class DatabasePanel extends Panel |
||
| 11 | { |
||
| 12 | use Stringify; |
||
| 13 | |||
| 14 | public function render() |
||
| 15 | { |
||
| 16 | $dbStats = $this->getDatabaseStats(); |
||
| 17 | |||
| 18 | return view(Architect::template()->dashboard('database'), [ |
||
|
|
|||
| 19 | 'dbStats' => $dbStats, |
||
| 20 | ]); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | protected function getDatabaseStats() |
||
| 27 | { |
||
| 28 | if (connection('mysql')) { |
||
| 29 | return $this->connection()->select($this->connection()->raw('SHOW TABLE STATUS')); |
||
| 30 | } |
||
| 31 | |||
| 32 | return collect([]); |
||
| 33 | } |
||
| 34 | |||
| 35 | protected function connection() |
||
| 38 | } |
||
| 39 | } |
||
| 40 |