Veröffentliche fachliche Säulen als Themenbereiche der Website.
Deploy Test / test (push) Successful in 15s
Deploy Test / deploy (push) Successful in 22s

Dieselbe Liste trägt die öffentliche Seite. Medien bleiben privat, Seiten können mehreren Säulen zugeordnet sein.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-15 11:46:48 +01:00
1 parent af85a94cd5
commit 8cd382c357
21 files changed
+379 -13

No files matched your search

+23
View File
@@ -2,8 +2,10 @@
namespace App\Domain\Cms;
use App\Domain\Catalog\Pillar;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
@@ -42,4 +44,25 @@ public function publicUrl(): string
{
return $this->path === '/' ? url('/') : url($this->path);
}
public function publicTitle(): string
{
$revision = $this->publishedRevision;
$heading = collect($revision?->blocks ?? [])->firstWhere('type', 'heading');
if (is_string($revision?->seo_title) && $revision->seo_title !== '') {
return $revision->seo_title;
}
if (is_array($heading) && is_string($heading['heading'] ?? null) && $heading['heading'] !== '') {
return $heading['heading'];
}
return $this->path;
}
public function pillars(): BelongsToMany
{
return $this->belongsToMany(Pillar::class)->orderBy('pillars.name');
}
}