Ejemplo n.º 1
0
 protected function loadOptions()
 {
     $repository = new BaseRepository($this->getModelForOptions());
     $key = $repository->getModel()->getKeyName();
     $options = $repository->getQuery()->get()->lists($this->getDisplay(), $key);
     if ($options instanceof Collection) {
         $options = $options->all();
     }
     $this->setOptions($options);
 }
 /**
  * @param string $class
  */
 public function __construct($class)
 {
     parent::__construct($class);
     $this->detectType();
 }