__('Status 0'), '1' => __('Status 1')]; } public function getEmployeeTypeList() { return ['1' => __('Employee_type 1'), '2' => __('Employee_type 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 getEmployeeTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['employee_type']) ? $data['employee_type'] : ''); $list = $this->getEmployeeTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function firmduty() { return $this->belongsTo('Firmduty', 'firmduty_id', 'id', [], 'LEFT')->setEagerlyType(0); } }