feat: add user favorites functionality

This commit is contained in:
2026-08-22 07:40:26 +03:30
parent b6a5d96098
commit 54575b2199
2 changed files with 31 additions and 4 deletions
@@ -58,10 +58,28 @@
اکنون ثبت کن
</button>
<a href="#" class="border-btn">
<i class="far fa-heart"></i>
افزودن به علاقه مندی ها
</a>
@auth
<form action="{{ route('accounts.favorites.tour.toggle', ['tour' => $tour->id]) }}"
method="POST"
class="d-inline">
@csrf
<button type="submit" class="border-btn border-0">
@if ($isFavorite)
<i class="fas fa-heart"></i>
حذف از علاقه‌مندی‌ها
@else
<i class="far fa-heart"></i>
افزودن به علاقه‌مندی‌ها
@endif
</button>
</form>
@else
<a href="{{ route('auth.login.index') }}" class="border-btn">
<i class="far fa-heart"></i>
افزودن به علاقه‌مندی‌ها
</a>
@endauth
</div>
</div>
</form>