style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
+20 -4
View File
@@ -1,13 +1,29 @@
<?php
namespace Modules\Sites\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
final class SiteContent extends Model
{
protected $table = 'site_content';
protected $fillable = ['site_id','content_type','content_id','is_primary'];
protected function casts(): array { return ['is_primary'=>'boolean']; }
public function site(): BelongsTo { return $this->belongsTo(Site::class); }
public function content(): MorphTo { return $this->morphTo(__FUNCTION__, 'content_type', 'content_id'); }
protected $fillable = ['site_id', 'content_type', 'content_id', 'is_primary'];
protected function casts(): array
{
return ['is_primary' => 'boolean'];
}
public function site(): BelongsTo
{
return $this->belongsTo(Site::class);
}
public function content(): MorphTo
{
return $this->morphTo(__FUNCTION__, 'content_type', 'content_id');
}
}