pedi3/app/Models/Barrio.php

27 lines
475 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Barrio extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
];
/**
* La región a la que pertenece el barrio.
*/
public function region(): BelongsTo
{
return $this->belongsTo(Region::class);
}
}