feat: add hero_config and event_config to Tenant model with validation and migration

This commit is contained in:
2026-07-14 11:08:59 -03:00
parent ca4fea6bcd
commit 2910d3f929
5 changed files with 68 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
'footer_bg_color',
'header_logo_id',
'footer_logo_id',
'hero_config',
'event_config',
])]
class Tenant extends Model
{
@@ -32,6 +34,19 @@ class Tenant extends Model
return 'codigo';
}
/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'hero_config' => 'array',
'event_config' => 'array',
];
}
/**
* @return BelongsTo<Attachment, $this>
*/