feat: add desciption to category and sub category

This commit is contained in:
2026-06-03 16:07:29 +03:30
parent 0cb4954579
commit c52a234835
8 changed files with 107 additions and 7 deletions
+8 -1
View File
@@ -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()
{