pedi3/app/Models/Region.php

34 lines
596 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Region extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'regiones';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
2024-07-03 19:23:19 -03:00
'nombre',
];
/**
* Los barrios que pertenecen a la región.
*/
public function barrios(): HasMany
{
return $this->hasMany(Barrio::class);
}
}