Merge pull request #2851 from CihanSenturk/category-types-may-be-confusing
Category search title
This commit is contained in:
commit
e8f3cb033c
@ -25,6 +25,8 @@ class Category extends Model
|
||||
|
||||
protected $table = 'categories';
|
||||
|
||||
protected $appends = ['display_name'];
|
||||
|
||||
/**
|
||||
* Attributes that should be mass-assignable.
|
||||
*
|
||||
@ -227,6 +229,14 @@ class Category extends Model
|
||||
return $this->getHexCodeOfTailwindClass($this->color);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the display name of the category.
|
||||
*/
|
||||
public function getDisplayNameAttribute()
|
||||
{
|
||||
return $this->name . ' (' . ucfirst($this->type) . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the line actions.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user