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

Class name must be a valid object or a string #67

Open
ankitabhatti05 opened this issue Nov 27, 2018 · 3 comments
Open

Class name must be a valid object or a string #67

ankitabhatti05 opened this issue Nov 27, 2018 · 3 comments

Comments

@ankitabhatti05
Copy link

I got an error of Class name must be a valid object or a string while I'm adding an item in the cart.

I am getting this error in ShopCartTrait of the add method

@ankitabhatti05
Copy link
Author

Hello,
I solved it by changing return $this->belongsTo(Config::get('auth.model'), 'user_id');
to return $this->belongsTo(Config::get('auth.providers.users.model'), 'user_id'); in vendor\amsgames\laravel-shop\src\Traits\ShopCartTrait and it works.

@ndhaked
Copy link

ndhaked commented Nov 28, 2018 via email

@ankitabhatti05
Copy link
Author

share your personal mail id

On Tue, Nov 27, 2018 at 12:03 PM ankitabhatti05 @.***> wrote: Hello, I solved it by changing return $this->belongsTo(Config::get('auth.model'), 'user_id'); to return $this->belongsTo(Config::get('auth.providers.users.model'), 'user_id'); in vendor\amsgames\laravel-shop\src\Traits\ShopCartTrait and it works. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#67 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AcCnKZq8iuYkc_98c11nm-nFVkgF17ZSks5uzSojgaJpZM4Y1JQF .
-- RegardsNirbhay Singh Dhaked Sr. Php Developer *Konstant infosolutions * pvt.ltd Jaipur (Rajasthan) 302020Cont:- 9269967182

It's [email protected]

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