Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The store method is not storing anything in the db #680

Open
Malfunction13 opened this issue Jun 27, 2023 · 1 comment
Open

The store method is not storing anything in the db #680

Malfunction13 opened this issue Jun 27, 2023 · 1 comment

Comments

@Malfunction13
Copy link

Hi community,
Can you please explain how to properly setup the cart because it simply does not write anything to the db when using the store() method.
Utilizing the package via Facade
Using Laravel8 in Docker container setup and MySQL again in a container.
It doesn't throw any errors, dumping provides contents/total etc/ however nothing is persisted to DB.

Is there some specific configuration that needs to be done in cart.php for DB connection or am I missing something else?

@darshannv
Copy link

Try to use Laravel facade
for example :-

$rowId = $request->input('rowId');
     $qty` = $request->input('qty');

        // Update the cart
        Cart::update($rowId, $qty);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants