Files
hatame.andarza09/app/Http/Controllers/HomeController.php
T
hatame f97002294e git add .
git commit "Add latest flights and tours components"
2026-08-16 17:01:48 +03:30

23 lines
413 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Flight;
use App\Models\Tour;
class HomeController extends Controller
{
public function index()
{
$flights = Flight::latest('created_at')
->take(6)
->get();
$tours = Tour::latest('created_at')
->take(6)
->get();
return view('home.index', compact('flights', 'tours'));
}
}