Current File : /home/tradevaly/www/app/Http/Controllers/User/ProductCartController.php
<?php

namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use App\Models\Cart;
use Brian2694\Toastr\Facades\Toastr;
use Illuminate\Http\Request;

class CartController extends Controller
{
    public function index(){
        
    }
    public Function store(Request $request)
    {
        $cart = new Cart();
        $cart->product_id = $request->product_id;
        $cart->user_id = $request->auth()->id();
        $cart->quantity = $request->quantity;
        $cart->save();
    }
}