optional($this->field)->name ); } /** * Foreign Keys */ public function field() { return $this->belongsTo(UserField::class, 'user_field_id'); } public function user() { return $this->belongsTo(User::class, 'user_id'); } }