__('Hidden'), 'checking' => __('Checking'), 'normal' => __('Normal')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function fetchByAgency($admin) { return $this ->where("status", \E_BASE_STATUS::Normal) ->where("city_code", "in", explode(",", $admin["city_codes"])) ->select(); } public function area() { return $this->belongsTo(Area::class, 'city_code', 'area_code', [], 'LEFT')->setEagerlyType(0); } }