@php $categories_list = App\Models\Category::where('status', 'Active')->get(); @endphp
@php $socials = App\Models\Social::first(); $sessionId = session()->getId(); $userId = auth()->check() ? auth()->id() : null; $wishlistCount = $userId ? \App\Models\Wishlist::where('user_id', $userId)->count() : \App\Models\Wishlist::where('session_id', $sessionId)->count(); $cartCount = $userId ? \App\Models\Cart::where('user_id', $userId)->sum('quantity') : \App\Models\Cart::where('session_id', $sessionId)->sum('quantity'); @endphp
{{-- LEFT : LOGO --}} {{-- CENTER : SEARCH + BUTTONS --}}
{{-- SEARCH --}} {{-- VENDOR REGISTER --}}
{{-- RIGHT : ICONS --}}
{{-- WISHLIST --}} @if ($wishlistCount > 0) {{ $wishlistCount }} @endif {{-- CART --}} @if ($cartCount > 0) {{ $cartCount }} @endif {{-- USER --}} @php $user = Auth::user(); @endphp @if ($user) @else @endif
@php $categories = App\Models\Category::where('status', 'Active')->get(); @endphp
{{-- --}}