<?php
 namespace ModStart\Grid\Filter\Field; use Encore\Admin\Facades\Admin; use ModStart\Core\Exception\BizException; use ModStart\Core\Type\BaseType; class Select extends AbstractFilterField { protected $options = []; protected function setup() { $this->addFluentAttributeVariable('options'); } public function options($options = null) { if (null === $options) { return $this->options; } if (is_string($options) && is_subclass_of($options, BaseType::class)) { $value = $options::getList(); } else if (is_array($options)) { $value = $options; } else { BizException::throws('Select options error'); } $this->options = $value; } } 