wip
This commit is contained in:
parent
c82b4883a7
commit
5772eca363
|
|
@ -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 . ' - ' : '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue