Files
nutzwerte_fi4/app/Models/Inhaltsverzeichnis.php
T
2025-11-07 10:52:36 +01:00

46 lines
916 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Inhaltsverzeichnis extends Model
{
protected $fillable = [
'name',
'ueberschrift_verbergen',
'inhaltselement_id',
'textblock_id',
'sort',
'ordnungszahl',
'seite',
'neue_seite',
'seitenzahl_anzeige',
'hilfe_titel',
'hilfe_description',
'hilfe_image',
];
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'seitenzahl_anzeige' => 'boolean',
];
}
public function textblock()
{
return $this->hasMany(Textblock::class, 'id', 'textblock_id');
}
public function inhaltselement()
{
return $this->hasMany(Inhaltselement::class, 'id', 'inhaltselement_id');
}
}