feat(Category): add category

This commit is contained in:
2026-05-03 23:38:21 +03:30
parent ededb41a3a
commit 21b060c527
13 changed files with 300 additions and 5 deletions

View File

@@ -14,7 +14,8 @@ class JudicialPrecedent extends Model
'ruling_date',
'subject',
'full_text',
'issuing_authority'
'issuing_authority',
'category_id'
];
protected $hidden = ['created_at', 'updated_at'];
@@ -23,4 +24,9 @@ class JudicialPrecedent extends Model
{
return $this->belongsToMany(Art::class, 'art_judicial_precedent');
}
public function category()
{
return $this->belongsTo(JudicialPrecedentCategory::class, 'category_id');
}
}