| @@ 254-261 (lines=8) @@ | ||
| 251 | $this->attributes['ip'] = inet_pton($ip); |
|
| 252 | } |
|
| 253 | ||
| 254 | public function scopeIsUp($query) |
|
| 255 | { |
|
| 256 | return $query->where([ |
|
| 257 | ['status', '=', 1], |
|
| 258 | ['ignore', '=', 0], |
|
| 259 | ['disabled', '=', 0] |
|
| 260 | ]); |
|
| 261 | } |
|
| 262 | ||
| 263 | public function scopeIsDown($query) |
|
| 264 | { |
|
| @@ 263-270 (lines=8) @@ | ||
| 260 | ]); |
|
| 261 | } |
|
| 262 | ||
| 263 | public function scopeIsDown($query) |
|
| 264 | { |
|
| 265 | return $query->where([ |
|
| 266 | ['status', '=', 0], |
|
| 267 | ['ignore', '=', 0], |
|
| 268 | ['disabled', '=', 0] |
|
| 269 | ]); |
|
| 270 | } |
|
| 271 | ||
| 272 | // ---- Define Relationships ---- |
|
| 273 | ||