fix: update homepage data
This commit is contained in:
@@ -9,6 +9,7 @@ class IndexController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
|
||||
$tours = Tour::query()
|
||||
->where('status', 1)
|
||||
->orderByDesc('created_at')
|
||||
@@ -19,9 +20,13 @@ class IndexController extends Controller
|
||||
->orderByDesc('created_at')
|
||||
->paginate(6, ['*'], 'flights_page');
|
||||
|
||||
$latestTours= Tour::latest()->limit(6)->get();
|
||||
$latestFlights = Flight::latest()->limit(6)->get();
|
||||
|
||||
return view('index', [
|
||||
'tours' => $tours,
|
||||
'flights' => $flights,
|
||||
compact('latestTours', 'latestFlights')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user