/**
  * Handle the command.
  *
  * @param Container $container
  */
 public function handle(Container $container)
 {
     $handler = array_get($this->fieldType->getConfig(), 'handler');
     if (!class_exists($handler) && !str_contains($handler, '@')) {
         $handler = array_get($this->fieldType->getHandlers(), $handler);
     }
     if (is_string($handler) && !str_contains($handler, '@')) {
         $handler .= '@handle';
     }
     $container->call($handler, ['fieldType' => $this->fieldType]);
 }
 /**
  * Handle the options.
  *
  * @param MultipleFieldType $fieldType
  * @return array
  * @throws \Exception
  */
 public function handle(MultipleFieldType $fieldType)
 {
     $model = $fieldType->getRelatedModel();
     if (!$model instanceof EloquentModel) {
         return [];
     }
     return $model->all()->lists(array_get($fieldType->getConfig(), 'title', $model->getTitleName()), $model->getKeyName());
 }