@foreach($account->OwnedGames as $game)
<img src="{{$game->icon}}">
@endforeach
$user_pay = Payments::where('user_id', $user->id)->where('status', 1)->limit(10)->orderBy('id', 'desc')->get();
session()->put('cart', $cart);
session()->push('cart', $cart);
$product = Product::select('id' ,"title","quantity","price")->findOrFail($id);
$cart = session()->get('cart', []);
if(!empty($cart[$id])) {
$cart[$id]['quantity']++;
}
return view('profile.my.show', compact('user', 'departments', 'users'));
Тернарный оператор