*/ public function rules(): array { /** @var DocumentationCategory|null $category */ $category = $this->route('category'); return [ 'name' => ['required', 'string', 'max:150'], 'slug' => ['nullable', 'string', 'max:180', Rule::unique('documentation_categories', 'slug')->ignore($category?->id)], 'icon' => ['nullable', 'string', 'max:80'], 'colour' => ['required', 'string', 'max:32'], 'description' => ['nullable', 'string', 'max:2000'], 'sort_order' => ['nullable', 'integer', 'min:0', 'max:999999'], 'is_active' => ['nullable', 'boolean'], ]; } }