Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | protected function execute(InputInterface $input , OutputInterface $output) |
||
38 | { |
||
39 | $command = new Style($input, $output); |
||
40 | |||
41 | $servers = $this->model->all(); |
||
42 | |||
43 | if ($servers->count() > 0) { |
||
44 | |||
45 | (new Table($output))->setHeaders(['Id', 'Name', 'Ip address', 'Last connect']) |
||
46 | ->setRows(json_decode($servers->toJson(), true)) |
||
47 | ->render(); |
||
48 | } else { |
||
49 | |||
50 | $command->line("No server added to the list. use [ server:add ] to add one."); |
||
51 | } |
||
52 | } |
||
53 | } |
||
54 |