|string> */ public function rules(): array { return [ 'variety_name' => ['required', 'string', 'max:255', Rule::unique('grape_varieties', 'variety_name')->ignore($this->grapeVariety)], 'description' => ['nullable', 'string'], 'origin' => ['nullable', 'string', 'max:255'], 'wine_type' => ['nullable', 'in:red,white,rose'], 'characteristics' => ['nullable', 'string'], 'image_url' => ['nullable', 'url', 'max:500'], ]; } /** * Get custom attribute names for validator errors. * * @return array */ public function attributes(): array { return [ 'variety_name' => 'variety name', 'wine_type' => 'wine type', 'image_url' => 'image URL', ]; } }