fix: update homepage
This commit is contained in:
@@ -2,12 +2,23 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use App\Models\Flight;
|
||||||
|
use App\Models\Tour;
|
||||||
|
|
||||||
class IndexController extends Controller
|
class IndexController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return view('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'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1836
-880
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user