git commit "fix user panel pages hero layout and add profile dropdown improvements"

This commit is contained in:
2026-08-17 16:34:14 +03:30
parent ea1a0cc0c4
commit 523c9d0396
21 changed files with 583 additions and 1356 deletions
+29 -13
View File
@@ -3,33 +3,49 @@
namespace App\Http\Controllers;
use App\Models\Flight;
use App\Models\Tour;
use Illuminate\Http\Request;
class FlightController extends Controller
{
public function index()
public function index(Request $request)
{
$newestFlight = Flight::
latest()
->applySearch()
->take(10)
$flights = Flight::latest()
->applySearch($request->all())
->paginate(10);
$newestFlight = Flight::latest()
->take(3)
->get();
$flights = Flight::latest()->
paginate(9);
return view('home.index', compact('newestFlight', 'flights'));
$newestTour = Tour::latest()
->take(3)
->get();
$tours = Tour::latest()
->paginate(10);
return view('flights.index', compact(
'flights',
'newestFlight',
'newestTour',
'tours'
));
}
public function show(Flight $flight)
public function show(Flight $flight)
{
$flight->increment('views');
$comments = $flight->comments()
->latest()
->latest()
->get();
return view('flights.show', compact('flight','comments'));
return view('flights.show', compact('flight', 'comments'));
}
}
}