This commit is contained in:
2026-08-15 12:35:30 +03:30
commit 60936f504d
77 changed files with 14152 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class City
*
* @property int $id
* @property int $county_id
* @property string $name
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
* @property string|null $deleted_at
*
* @property Country $country
* @property Collection|Tour[] $tours
*
* @package App\Models
*/
class City extends Model
{
use SoftDeletes;
protected $table = 'cities';
public static $snakeAttributes = false;
protected $casts = [
'county_id' => 'int',
'status' => 'int'
];
protected $fillable = [
'county_id',
'name',
'status'
];
public function country()
{
return $this->belongsTo(Country::class, 'county_id');
}
public function tours()
{
return $this->hasMany(Tour::class, 'destination_city_id');
}
}