This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

kiszna991723396
kiszna991723396

Is it possible to sort custom column in backend list? If possible, can anybody help me how is this done? I have created getAttribute function in my model: public function getDigitalIdStatusAttribute(){ $userId = $this->id; if($badgeCodes=DB::table('theroomexchange_api_verification_badge') ->join('theroomexchange_api_user_has_verification_badge','theroomexchange_api_user_has_verification_badge.verificationbadge_id','=','theroomexchange_api_verification_badge.id') ->join('theroomexchange_api_user','theroomexchange_api_user.id','=','theroomexchange_api_user_has_verification_badge.user_id') ->where('theroomexchange_api_user.id','=',$userId) ->where('theroomexchange_api_verification_badge.badge_code','=',VerificationBadge::$digitalIdBadge) ->select('theroomexchange_api_verification_badge.badge_code') ->first()){ return 'Verified'; } return 'Not Verified'; } and in columns.yaml digitalid: label: 'DIGITAL ID' type: text searchable: true sortable: true valueFrom: digitalIdStatus It gives sql error stating: unknown column digitalIdStatus

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.