__('Status 0'), '1' => __('Status 1'), '2' => __('Status 2')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function usera() { return $this->belongsTo('User', 'uid', 'id', [], 'LEFT')->setEagerlyType(0); } public function userb() { return $this->belongsTo('User', 'to_uid', 'id', [], 'LEFT')->setEagerlyType(0); } public function relation() { return $this->belongsTo('Relation', 'relation_id', 'id', [], 'LEFT')->setEagerlyType(0); } }