BreedingPageType::class, 'media_type' => InputType::class ]; protected $casts = [ 'content' => 'array', ]; protected $fillable = [ 'title', 'headerContent', 'seo_title', 'seo_description', 'headerContent', 'subtitle', 'subtitleContent', 'media_type', 'picture', 'picture_alt', 'picture_title', 'video', 'content', 'status' ]; protected static function booted() { static::creating(function (BreedingPage $page) { $page->slug = Str::slug($page->title); }); static::updating(function (BreedingPage $page) { $page->slug = Str::slug($page->title); }); } public function getRouteKeyName() { return 'slug'; } /** * Get Blocks Template Data * * @return array */ public static function getBlocks(): array { return [ BreedingBlocType::bloc1()->value => [ 'type' => BreedingBlocType::bloc1(), 'content' => [ 'dropdownArray' => [ 'label' => 'Dropdowns', 'inputType' => InputType::dropdownArray(), 'value' => [] ] ] ] ]; } }