@php $count = App\Models\ShoppingCart::where('user_id', @auth()->user()->id ?? session()->get('randomId'))->count(); @endphp {{ $count }}