get(class_basename($this->enum)); } /** * Get the directives of the field. * * @return array */ public function directives(): array { return [ 'enumField' => [], ]; } /** * Resolve the field. * * @param mixed $root * @return mixed */ public function resolve(mixed $root): mixed { return Arr::get($root, $this->column)?->name; } /** * The directives available for this filter. * * @return array */ public function filterDirectives(): array { return [ new InFilterDirective($this, $this->type()), new NotInFilterDirective($this, $this->type()), ]; } }