2f431971c0
git commit "Complete project development and finalize features"
32 lines
602 B
PHP
32 lines
602 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'
|
|
));
|
|
}
|
|
}
|