26 lines
476 B
PHP
26 lines
476 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||
|
|
||
|
class PlaceType extends Model
|
||
|
{
|
||
|
use HasFactory;
|
||
|
|
||
|
protected $fillable = [
|
||
|
'id',
|
||
|
'name',
|
||
|
'description',
|
||
|
'slug',
|
||
|
'position',
|
||
|
];
|
||
|
|
||
|
public function places(): HasMany
|
||
|
{
|
||
|
return $this->hasMany('App\Models\Place', 'place_type_id');
|
||
|
}
|
||
|
}
|