user()->hasPermission('update-settings'); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'site_title' => 'required|string|max:255', 'seo_description' => 'nullable|string|max:500', 'seo_keywords' => 'nullable|array', 'seo_keywords.*' => 'string|max:50', 'supported_languages' => 'required|array|min:1', 'supported_languages.*.name' => 'required|string|max:50', 'supported_languages.*.abbreviation' => 'required|string|size:2', 'default_locale' => 'required|string|size:2', 'translation_driver' => 'required|string|in:mock,google,deepl,openai', 'google_translate_key' => 'nullable|string|max:255', 'deepl_api_key' => 'nullable|string|max:255', 'openai_api_key' => 'nullable|string|max:255', ]; } }