Skip to content

Commit bcea8cc

Browse files
committed
fix str_slug unsupported on another languages (arabic, japanese...)
1 parent 7fe4e12 commit bcea8cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ProviderAndDumperAggregator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ public function getName() : string
110110

111111
public function geocode(string $value) : self
112112
{
113-
$cacheKey = str_slug($value);
113+
#https://stackoverflow.com/questions/22112029/strslug-alternative-for-hindi-and-arabic-strings?noredirect=1&lq=1
114+
$cacheKey = (empty(str_slug($value)))?urlencode($value):str_slug($value);
114115
$this->results = cache()->remember(
115116
"geocoder-{$cacheKey}",
116117
config('geocoder.cache-duraction', 0),

0 commit comments

Comments
 (0)