25 lines
507 B
PHP
25 lines
507 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Flight;
|
|
use App\Models\Tour;
|
|
|
|
class IndexController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$tours = Tour::query()
|
|
->where('status', 1)
|
|
->latest()
|
|
->paginate(6, ['*'], 'tours_page');
|
|
|
|
$flights = Flight::query()
|
|
->where('status', 1)
|
|
->latest()
|
|
->paginate(6, ['*'], 'flights_page');
|
|
|
|
return view('index', compact('tours', 'flights'));
|
|
}
|
|
}
|