feat: add desciption to category and sub category
This commit is contained in:
@@ -6,7 +6,14 @@
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
protected $fillable = ['name'];
|
||||
protected $fillable = ['name', 'description', 'icon'];
|
||||
|
||||
protected $appends = ['icon_url'];
|
||||
|
||||
public function getIconUrlAttribute(): ?string
|
||||
{
|
||||
return $this->icon ? asset('storage/' . $this->icon) : null;
|
||||
}
|
||||
|
||||
public function questions()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user