*/ public function rules(): array { return [ 'name' => ['required', 'string', 'max:255'], 'slug' => ['nullable', 'string', 'max:255', Rule::unique('tools', 'slug')], 'description' => ['required', 'string'], 'url' => ['required', 'url', 'max:255'], 'logo_url' => ['nullable', 'url', 'max:255'], 'category' => ['required', Rule::in(array_keys(config('tools.categories')))], 'subcategory' => ['nullable', 'string', 'max:255'], 'tags' => ['sometimes', 'array'], 'tags.*' => ['string', 'max:50'], 'pricing' => ['nullable', 'string', 'max:255'], 'features' => ['sometimes', 'array'], 'features.*' => ['string', 'max:255'], 'featured' => ['sometimes', 'boolean'], 'approved' => ['sometimes', 'boolean'], ]; } }