git add .

git commit "Add latest flights and tours components"
This commit is contained in:
2026-08-16 17:01:48 +03:30
parent 043b6ed931
commit f97002294e
3 changed files with 7 additions and 5 deletions
+7 -3
View File
@@ -3,16 +3,20 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Flight; use App\Models\Flight;
use App\Models\Tour;
class HomeController extends Controller class HomeController extends Controller
{ {
public function index() public function index()
{ {
$latestFlights = Flight::query() $flights = Flight::latest('created_at')
->latest()
->take(6) ->take(6)
->get(); ->get();
return view('home.index', compact('latestFlights')); $tours = Tour::latest('created_at')
->take(6)
->get();
return view('home.index', compact('flights', 'tours'));
} }
} }
@@ -1,5 +1,4 @@
@foreach($flights as $flight) @foreach($flights as $flight)
<!-- FLIGHT ITEM --> <!-- FLIGHT ITEM -->
<div class="swiper-slide flight-card group"> <div class="swiper-slide flight-card group">
@@ -1,5 +1,4 @@
@foreach($tours as $tour) @foreach($tours as $tour)
<!-- TOUR ITEM --> <!-- TOUR ITEM -->
<div class="swiper-slide tour-card group"> <div class="swiper-slide tour-card group">