1 | <?php |
||
14 | class Monitor extends Model |
||
15 | { |
||
16 | use SupportsUptimeCheck, |
||
17 | SupportsSslCertificateCheck, |
||
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 | 'ssl_certificate_expiration_date', |
||
27 | ]; |
||
28 | |||
29 | protected $casts = [ |
||
30 | 'enabled' => 'boolean', |
||
31 | 'check_ssl_certificate' => 'boolean', |
||
32 | ]; |
||
33 | |||
34 | public function scopeEnabled($query) |
||
38 | |||
39 | public function getUrlAttribute() |
||
47 | |||
48 | public static function boot() |
||
58 | |||
59 | public function isHealthy() |
||
71 | |||
72 | protected static function alreadyExists(Monitor $monitor): bool |
||
82 | } |
||
83 |