* renderRegion() * draft and published-state handling * document and placement scheduling * disabled-placement filtering * ordered region rendering * safe fallback when composition tables or document views are missing * compatibility with common alternative column names
19 lines
657 B
PHP
19 lines
657 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Content\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
final class ContentDocument extends Model
|
|
{
|
|
protected $fillable = ['content_type_id','title','slug','status','data','published_at','expires_at'];
|
|
protected $casts = ['data'=>'array','published_at'=>'datetime','expires_at'=>'datetime'];
|
|
|
|
public function type(): BelongsTo { return $this->belongsTo(ContentType::class, 'content_type_id'); }
|
|
public function placements(): HasMany { return $this->hasMany(PageContent::class); }
|
|
}
|