get(); } public static function getCityByParentId($parentId) { return self::where('parentid', $parentId) ->where('level', '2') ->get(); } public static function getAreaByParentId($parentId) { return self::where('parentid', $parentId) ->where('level', '3') ->get(); } public static function getAddress($data) { return self::whereIn('id', $data) ->get(); } public function hasOneParent() { return $this->hasOne(self::class, 'id', 'parentid'); } }