__('Gender 1'), '0' => __('Gender 0')]; } public function getIsDefaultList() { return ['1' => __('Is_default 1'), '0' => __('Is_default 0')]; } public function getGenderTextAttr($value, $data) { $value = $value ? $value : (isset($data['gender']) ? $data['gender'] : ''); $list = $this->getGenderList(); return isset($list[$value]) ? $list[$value] : ''; } public function getIsDefaultTextAttr($value, $data) { $value = $value ? $value : (isset($data['is_default']) ? $data['is_default'] : ''); $list = $this->getIsDefaultList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function school() { return $this->belongsTo('School', 'school_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function grade() { return $this->belongsTo('Grade', 'grade_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function classes() { return $this->belongsTo('Classes', 'classes_id', 'id', [], 'LEFT')->setEagerlyType(0); } }