Files
laraundfelix/app/Domain/Catalog/ContentElement.php
T
LarsandCursor af85a94cd5
Deploy Test / test (push) Successful in 15s
Deploy Test / deploy (push) Successful in 22s
Zeige Medienfassungen in der Verwaltung und halte Beschreibungen davon getrennt.
Eine Fassung bleibt nummeriert und kann deaktiviert werden. Beschreibung und fachliche Säulen gehören zum Medium und legen keine neue Fassung an.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-15 11:25:08 +01:00

36 lines
743 B
PHP

<?php
namespace App\Domain\Catalog;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
class ContentElement extends Model
{
protected $fillable = [
'kind',
'output_class',
'working_title',
'description',
'archived_at',
];
protected function casts(): array
{
return [
'archived_at' => 'datetime',
];
}
public function versions(): HasMany
{
return $this->hasMany(ContentElementVersion::class);
}
public function pillars(): BelongsToMany
{
return $this->belongsToMany(Pillar::class)->orderBy('pillars.name');
}
}