1 | <?php |
||
8 | class Statistics |
||
9 | { |
||
10 | /** |
||
11 | * Returns the count of all pokes. |
||
12 | * |
||
13 | * @return mixed |
||
14 | */ |
||
15 | 1 | public function totalPokes() |
|
21 | |||
22 | /** |
||
23 | * Returns the the count of all devices. |
||
24 | * |
||
25 | * @return mixed |
||
26 | */ |
||
27 | 1 | public function totalDevices() |
|
28 | { |
||
29 | 1 | return Poke::distinct()->count('mac'); |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * Returns all pokes. |
||
34 | * |
||
35 | * @return mixed |
||
36 | */ |
||
37 | 1 | public function allPokes() |
|
45 | |||
46 | /** |
||
47 | * Returns a collection of all networks and it's count. |
||
48 | * |
||
49 | * @return mixed |
||
50 | */ |
||
51 | 1 | public function networkDistribution() |
|
79 | |||
80 | /** |
||
81 | * Creates the Regexp function for the SQLITE database. |
||
82 | */ |
||
83 | 1 | protected function createSqliteRegexpFunction() |
|
87 | |||
88 | 1 | private function addColors($data) |
|
99 | } |
||
100 |