lots of progress
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Site extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'url',
|
||||
'name',
|
||||
'monitoring_enabled',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'monitoring_enabled' => 'boolean',
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function uptimeChecks(): HasMany
|
||||
{
|
||||
return $this->hasMany(UptimeCheck::class);
|
||||
}
|
||||
|
||||
public function sslCertificates(): HasMany
|
||||
{
|
||||
return $this->hasMany(SslCertificate::class);
|
||||
}
|
||||
|
||||
public function brokenLinks(): HasMany
|
||||
{
|
||||
return $this->hasMany(BrokenLink::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user