Fixed issue with category type

This commit is contained in:
EnesSacid-Buker
2023-03-03 10:11:26 +03:00
parent a149b358a3
commit 43c4a7b096
2 changed files with 74 additions and 2 deletions

View File

@ -7,7 +7,7 @@ use Illuminate\Support\Str;
trait Categories
{
public function getCategoryTypes(): array
public function getCategoryTypes(bool $translate = true): array
{
$types = [];
$configs = config('type.category');
@ -21,7 +21,7 @@ trait Categories
$name = $attr['alias'] . '::' . $name;
}
$types[$type] = trans_choice($name, 1);
$types[$type] = $translate ? trans_choice($name, 1) : $name;
}
return $types;