Closed issour closed 4 years ago
same here!
you can work around the problem by generating a custom object array like this:
$typesArray = []; foreach (EntityType::all() as $entityType) { $type = new \stdClass(); $type->id = $entityType->id; $type->name = $entityType->name; $typesArray[] = $type; } NovaBelongsToDepend::make(__('Entity Type'), 'type')->options($typesArray)
public function getNameAttribute() { return $this->getTranslations('name')[app()->getLocale()]; }
Translatable::make([ NovaBelongsToDepend::make('Country', 'country') ->options(\App\Country::all()) ->rules('required'),
]),