git add .

git commit  "add tours pages, components and show views"
This commit is contained in:
2026-08-17 11:36:19 +03:30
parent e99c340f1e
commit 970786ae94
15 changed files with 595 additions and 249 deletions
+20 -4
View File
@@ -10,10 +10,26 @@ class HomeController extends Controller
{
public function index()
{
$newestFlight = Flight::latest()->take(10)->get();
$flights=Flight::latest()->paginate(5);
$newestTour = Tour::latest()->take(10)->get();
$newestFlight = Flight::
where('departure_date', '>=', now())
->orderBy('departure_date', 'asc')
->take(3)
->get();
$newestTour = Tour::latest()
->take(10)
->get();
return view('home.index', compact('newestFlight','flights', 'newestTour'));
$flights = Flight::latest()
->paginate(5);
$tours = Tour::latest()
->paginate(5);
return view('home.index', compact(
'newestFlight',
'newestTour',
'flights',
'tours'
));
}
}