'array', 'settings' => 'array', 'required' => 'boolean', ]; public function poll() { return $this->belongsTo(Poll::class); } public function answers() { return $this->hasMany(PollAnswer::class); } /** * Label in the given (or current) locale, falling back to the app fallback locale * and then to the first label that is filled in. */ public function labelFor(?string $locale = null): string { return Localized::pick($this->label, $locale); } /** * The question type handling this question. */ public function questionType(): QuestionType { return app(QuestionTypeRegistry::class)->get($this->type); } }