2024-03-11 19:08:31 -03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2024-03-19 15:40:27 -03:00
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
2024-03-11 19:08:31 -03:00
|
|
|
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',
|
2024-03-11 19:08:31 -03:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Los barrios que pertenecen a la región.
|
|
|
|
*/
|
|
|
|
public function barrios(): HasMany
|
|
|
|
{
|
|
|
|
return $this->hasMany(Barrio::class);
|
|
|
|
}
|
|
|
|
}
|