54 lines
953 B
PHP
54 lines
953 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class TravelPlace
|
|
*
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property string $description
|
|
* @property int $travel_country_id
|
|
* @property float $latitude
|
|
* @property float $longitude
|
|
* @property bool $active
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @property TravelCountry $travel_country
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class TravelPlace extends Model
|
|
{
|
|
protected $connection = 'mysql_stern';
|
|
protected $table = 'travel_places';
|
|
|
|
protected $casts = [
|
|
'travel_country_id' => 'int',
|
|
'latitude' => 'float',
|
|
'longitude' => 'float',
|
|
'active' => 'bool'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'description',
|
|
'travel_country_id',
|
|
'latitude',
|
|
'longitude',
|
|
'active'
|
|
];
|
|
|
|
public function travel_country()
|
|
{
|
|
return $this->belongsTo(TravelCountry::class);
|
|
}
|
|
}
|