fix : 카테고리 API

This commit is contained in:
2025-08-22 18:08:57 +09:00
parent cd81285731
commit 4b6e43ee62
5 changed files with 581 additions and 49 deletions

View File

@@ -23,6 +23,10 @@ class Category extends Model
'sort_order' => 'integer',
];
protected $hidden = [
'deleted_by','deleted_at'
];
// 계층
public function parent() { return $this->belongsTo(self::class, 'parent_id'); }
public function children() { return $this->hasMany(self::class, 'parent_id'); }