2023-09-01 00:21:35 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2024-02-23 00:27:22 +01:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
use App\Models\PlaceMunicipality;
|
2023-09-01 00:21:35 +02:00
|
|
|
|
|
|
|
class Place extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array<int, string>
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'lat',
|
|
|
|
'lon',
|
|
|
|
'place_id',
|
|
|
|
'osm_id',
|
|
|
|
'osm_type',
|
|
|
|
'licence',
|
|
|
|
'addresstype',
|
|
|
|
'country',
|
|
|
|
'country_code',
|
|
|
|
'name',
|
|
|
|
'display_name',
|
|
|
|
'road',
|
|
|
|
'house_number',
|
|
|
|
'postcode',
|
|
|
|
'state',
|
|
|
|
'village',
|
|
|
|
'suburb',
|
2024-02-23 00:27:22 +01:00
|
|
|
'city'
|
2023-09-01 00:21:35 +02:00
|
|
|
];
|
2024-02-23 00:27:22 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the municipality
|
|
|
|
*/
|
|
|
|
public function municipality(): BelongsTo {
|
|
|
|
return $this->belongsTo(PlaceMunicipality::class);
|
|
|
|
}
|
2023-09-01 00:21:35 +02:00
|
|
|
}
|