fix tr
This commit is contained in:
@@ -40,7 +40,7 @@ function tr(string $text, string $locale = 'tk'): string
|
|||||||
$text = json_decode($text);
|
$text = json_decode($text);
|
||||||
|
|
||||||
if ($text) {
|
if ($text) {
|
||||||
$text->{$locale} ?? '';
|
return $text->{$locale} ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class FilterController extends Controller
|
|||||||
->map(fn ($category) => [
|
->map(fn ($category) => [
|
||||||
'id' => $category->id,
|
'id' => $category->id,
|
||||||
'parent_id' => $category->parent_id,
|
'parent_id' => $category->parent_id,
|
||||||
'name' => $category->name,
|
'name' => tr($category->name),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user