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