This commit is contained in:
Cihan Şentürk 2026-03-14 00:50:44 +03:00
parent c82b4883a7
commit 5772eca363
1 changed files with 2 additions and 3 deletions

View File

@ -292,10 +292,9 @@ class Category extends Model
*/
public function getDisplayNameAttribute(): string
{
$typeConfig = config('type.category.' . $this->type, []);
$hideCode = isset($typeConfig['hide']) && in_array('code', $typeConfig['hide']);
$hideCode = $this->hideCodeCategoryType($this->type);
$typeNames = $this->getCategoryTypes();
$typeName = $typeNames[$this->type] ?? ucfirst($this->type);
$prefix = (!$hideCode && $this->code) ? $this->code . ' - ' : '';