feat:complement wishlist for dashboard side

This commit is contained in:
2026-08-18 12:45:37 +03:30
parent fa6910c653
commit 063d8f6d55
4 changed files with 351 additions and 0 deletions
@@ -0,0 +1,26 @@
<?php
namespace App\Http\Controllers\Account;
use App\Http\Controllers\Controller;
use App\Models\Favorite;
use Illuminate\Support\Facades\Auth;
class WishlistController extends Controller
{
public function index()
{
$favorites = Favorite::query()
->where('user_id', Auth::id())
->with([
'flight.departureAirport.city',
'flight.arrivalAirport.city',
'flight.file',
'tour.file',
])
->orderByDesc('id')
->paginate();
return view('account.wishlist', compact('favorites'));
}
}