__('Plantask_status 0'), '1' => __('Plantask_status 1')]; } public function getPlantaskStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['plantask_status']) ? $data['plantask_status'] : ''); $list = $this->getPlantaskStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function auser() { return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function buser() { return $this->belongsTo('User', 'to_user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }