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

+32
View File
@@ -2,6 +2,8 @@
namespace App\Domain\Catalog;
use App\Domain\Cms\Page;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
@@ -9,10 +11,40 @@ class Pillar extends Model
{
protected $fillable = [
'name',
'slug',
'public_summary',
'sort_order',
'published_at',
];
protected function casts(): array
{
return [
'published_at' => 'datetime',
];
}
public function elements(): BelongsToMany
{
return $this->belongsToMany(ContentElement::class);
}
public function pages(): BelongsToMany
{
return $this->belongsToMany(Page::class);
}
/**
* @param Builder<Pillar> $query
* @return Builder<Pillar>
*/
public function scopePublished(Builder $query): Builder
{
return $query->whereNotNull('published_at')->orderBy('sort_order')->orderBy('name');
}
public function publicUrl(): string
{
return route('theme', ['slug' => $this->slug]);
}
}