feat: complete flightShow and comments flight

This commit is contained in:
2026-08-17 14:09:39 -07:00
parent ff50fe1a95
commit c4692d8d8d
3 changed files with 22 additions and 3 deletions
+21 -1
View File
@@ -2,6 +2,9 @@
namespace App\Http\Controllers;
use App\Models\Airport;
use App\Models\Flight;
use App\Models\Tour;
use Illuminate\Http\Request;
class IndexController extends Controller
@@ -9,6 +12,23 @@ class IndexController extends Controller
public function index()
{
return view('index');
$flights = Flight::query()
->with([
'airport.city',
'airline',
'file'
])
->orderByDesc('created_at')
->limit(10)
->paginate();
$tours = Tour::query()
->orderByDesc('created_at')
->limit(10)
->paginate();
return view('index', compact('tours','flights'));
}
}