-
Notifications
You must be signed in to change notification settings - Fork 584
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 "App\Product" not found error being shown? #107
Comments
The same problem. |
Is this something you've implemented yourself recently? You could try running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there, I am following this tutorial on the latest version of Laravel. And when I am trying to dynamically render my shopping cart I get the following error:
This is my Laravel version:
"laravel/framework": "^8.12"
The file directory changes in this version. The product model is now located at:
app\Models\Product.php
instead ofapp\Product.php
and I think this is the cause of the error.My
CartController.php
looks like this:My
cart.blade.php
looks like this:Why am I getting this error? I thought I had fixed it by changing
->associate('App\Product');
to this:->associate('App\Models\Product');
The text was updated successfully, but these errors were encountered: