feat(Category): add category
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user