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