f97002294e
git commit "Add latest flights and tours components"
23 lines
413 B
PHP
23 lines
413 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Flight;
|
|
use App\Models\Tour;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$flights = Flight::latest('created_at')
|
|
->take(6)
|
|
->get();
|
|
|
|
$tours = Tour::latest('created_at')
|
|
->take(6)
|
|
->get();
|
|
|
|
return view('home.index', compact('flights', 'tours'));
|
|
}
|
|
}
|