*/ use HasFactory; protected $fillable = [ 'client_id', 'title', 'date', 'emotion', 'custom_color', 'gradient_preset', 'image', 'note', ]; protected function casts(): array { return [ 'date' => 'date:Y-m-d', 'emotion' => 'decimal:3', 'gradient_preset' => 'integer', ]; } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function media(): HasMany { return $this->hasMany(EventMedia::class); } }