|string> */ public function rules(): array { return [ 'strategy' => ['nullable', 'string', Rule::enum(CategoryDeletionStrategy::class)], ]; } /** * The chosen strategy for handling children, defaulting to lifting them up * to the deleted category's own parent. */ public function strategy(): CategoryDeletionStrategy { return CategoryDeletionStrategy::tryFrom((string) $this->input('strategy')) ?? CategoryDeletionStrategy::Reparent; } }