35 lines
639 B
PHP
35 lines
639 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Flight;
|
|
use App\Models\Tour;
|
|
use App\Models\Province;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$newestFlight = Flight::
|
|
orderBy('created_at', 'desc')
|
|
->paginate(1);
|
|
|
|
$newestTour = Tour::latest()
|
|
->paginate(2);
|
|
|
|
|
|
$flights = Flight::latest()
|
|
->paginate(5);
|
|
|
|
$tours = Tour::latest()
|
|
->paginate(5);
|
|
|
|
return view('home.index', compact(
|
|
'newestFlight',
|
|
'newestTour',
|
|
'flights',
|
|
'tours'
|
|
));
|
|
}
|
|
}
|