where([$this->getTable().'.status' => 1]); }); } public function getProvinceNameAttribute() { $area = Area::query()->find($this->attributes['province_id']); return $area->name ?? ''; } public function getCityNameAttribute() { $area = Area::query()->find($this->attributes['city_id']); return $area->name ?? ''; } public function getRegionNameAttribute() { $area = Area::query()->find($this->attributes['region_id']); return $area->name ?? ''; } public function stores() { return $this->hasMany(Store::class,'market_id','id'); } }