Hi every one,
Laravel 8.12 / LaravelShoppingcart 4.0
My CartController :
...
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Product;
use Cart;
...
public function add(Request $request) {
$product = Product::findOrFail($request->id);
Cart::instance('shopping')
->add([
'id' => $product->id,
'name' => $product->name,
'price' => $product->price,
'weight' => $product->weight,
'qty' => $request->quantity,
])
->associate('Product');
//dd(Cart::instance('shopping')->content());
/* Redirect to prevend re-adding on refreshing */
return redirect()->back()->with('cart', 'Product has been successfully added to the Cart.');
}
...
The dd(Cart::instance('shopping')->content()); output :
No error, and when I'm looking on /storage/framework/sessions I don't have any 'cart' trace at this time, so i'm thinking about a session issue but I really don't know where to search, any help ?
Hi every one, Laravel 8.12 / LaravelShoppingcart 4.0
My CartController :
The dd(Cart::instance('shopping')->content()); output :
My Product.blade.php show me the 'cart' flah message and I could open my #cartModal after the addCart action but always giving me an Empty cart
With this addCart form :
My routes :
No error, and when I'm looking on /storage/framework/sessions I don't have any 'cart' trace at this time, so i'm thinking about a session issue but I really don't know where to search, any help ?
No error on Nginx No error on broswer devtools :(