Files
law-api/app/Models/JudicialPrecedentCategory.php

19 lines
359 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class JudicialPrecedentCategory extends Model
{
use HasFactory;
protected $fillable = ['name'];
public function judicialPrecedents()
{
return $this->hasMany(JudicialPrecedent::class, 'category_id');
}
}