Componentalization

This commit is contained in:
2025-09-16 22:01:42 +10:00
parent e965cc2780
commit 91771e9573
19 changed files with 1683 additions and 223 deletions

View File

@@ -14,4 +14,10 @@ class Tour extends Model
{
return $this->belongsToMany(Country::class, 'tour_countries', 'tour_id', 'country_id');
}
public static function featuredTours(){
return Tour::whereHas('countries.continent')
->with('countries.continent')
->get();
}
}

View File

@@ -3,6 +3,7 @@
namespace App\Providers;
use App\Models\Continent;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use Inertia\Inertia;