*/ use HasFactory; public const PRESS_RELEASE_DELETED_PUBLISHED_TEXT = 'press_releases.deleted_published_text'; protected $fillable = [ 'key', 'area', 'type', 'label', 'value', 'payload', 'is_active', ]; protected function casts(): array { return [ 'payload' => 'array', 'is_active' => 'boolean', ]; } public static function activeValue(string $key, ?string $fallback = null): ?string { return static::query() ->where('key', $key) ->where('is_active', true) ->value('value') ?? $fallback; } }