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

Cart::current() method not work properly #39

Open
manoj10029 opened this issue Feb 28, 2016 · 2 comments
Open

Cart::current() method not work properly #39

manoj10029 opened this issue Feb 28, 2016 · 2 comments

Comments

@manoj10029
Copy link

when I use this method Cart::current() I got following error.
This method work properly $cartUser = Cart::findByUser($user->id);

Integrity constraint violation: 1048 Column 'user_id' cannot be null (SQL: insert into shpc_cart (user_id, updated_at, created_at) values (, 2016-02-28 13:18:48, 2016-02-28 13:18:48))

@devfelipereis
Copy link
Contributor

I see that you don't have an user_id in your insert. Are you trying this with a loggued in user?

@chicanh
Copy link

chicanh commented Feb 25, 2018

I faced the same issue but I realized it was because of my wrong setup for User model :)

https://github.com/amsgames/laravel-shop#user

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

3 participants