1 | <?php |
||
14 | class Monitor extends Model |
||
15 | { |
||
16 | use SupportsUptimeCheck, |
||
17 | SupportsCertificateCheck, |
||
18 | MonitorPresenter; |
||
19 | |||
20 | protected $guarded = []; |
||
21 | |||
22 | protected $dates = [ |
||
23 | 'uptime_last_check_date', |
||
24 | 'uptime_status_last_change_date', |
||
25 | 'down_event_fired_on_date', |
||
26 | 'certificate_expiration_date', |
||
27 | ]; |
||
28 | |||
29 | protected $casts = [ |
||
30 | 'uptime_check_enabled' => 'boolean', |
||
31 | 'certificate_check_enabled' => 'boolean', |
||
32 | ]; |
||
33 | |||
34 | public function scopeEnabled($query) |
||
40 | |||
41 | public function getUrlAttribute() |
||
49 | |||
50 | public static function boot() |
||
60 | |||
61 | public function isHealthy() |
||
73 | |||
74 | /** |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function enable() |
||
86 | |||
87 | /** |
||
88 | * @return $this |
||
89 | */ |
||
90 | public function disable() |
||
99 | |||
100 | protected static function alreadyExists(Monitor $monitor): bool |
||
110 | } |
||
111 |