__('Unit 1'), '2' => __('Unit 2')]; } public function getUnitTextAttr($value, $data) { $value = $value ?: ($data['unit'] ?? ''); $list = $this->getUnitList(); return $list[$value] ?? ''; } public function admin() { return $this->belongsTo(Admin::class, 'admin_id')->setEagerlyType(0); } }