'boolean', 'secret' => 'encrypted', 'use_path_style' => 'boolean', ]; } public static function current(): self { return static::query()->firstOrNew([]); } /** * Active isn't enough on its own — an admin could flip the toggle * before ever filling in real credentials (a blank bucket/key would * silently misroute every new upload to a broken disk). */ public function isConfigured(): bool { return $this->active && $this->key !== null && $this->key !== '' && $this->secret !== null && $this->secret !== '' && $this->bucket !== null && $this->bucket !== ''; } }