Featured tours working

This commit is contained in:
dredgy committed 2025-09-15 13:40:20 +10:00
1 parent f0e7ce30fc
commit e965cc2780
24 files changed
+384 -26

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Country extends Model
{
protected $fillable = [
'internal_name',
'name',
'country_code',
'continent_id',
];
public $timestamps = false;
public function continent(): BelongsTo
{
return $this->belongsTo(Continent::class);
}
public function tours(): BelongsToMany
{
return $this->belongsToMany(Tour::class, 'tour_countries', 'country_id', 'tour_id');
}
}