feat: display tours dynamically on index page

This commit is contained in:
2026-08-16 16:58:45 +03:30
parent 374c96bb79
commit 95cc970b07
9 changed files with 114 additions and 233 deletions
+9 -1
View File
@@ -2,6 +2,8 @@
namespace App\Http\Controllers;
use App\Models\Flight;
use App\Models\Tour;
use Illuminate\Http\Request;
class IndexController extends Controller
@@ -9,6 +11,12 @@ class IndexController extends Controller
//
public function index()
{
return view('index');
$tours = Tour::query()
->with(['file', 'tour_details','originAirport' , 'destinationAirport'])
->orderByDesc('created_at')
->limit(4)
->get();
return view('index' , compact('tours'));
}
}