Replies: 1 comment
-
This isn't a correct relationship. The code expectations is working correctly as what's being defined in Model and Nova Resource. However, What's in the schema doesn't tally what's in rhe Model |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Laravel Version:
10.10
Nova Version:
4.0
PHP Version:
8.1
Database Driver & Version:
MySQL 8.0
Operating System and Version:
macOS
Browser Type and Version:
Chrome 101
Description:
I'm encountering an issue with polymorphic relationships in Laravel Nova where the
itemable_model
column is not found in thecardables
table, leading to a SQL error. The exact error message is:Detailed Steps to Reproduce the Issue on a Fresh Nova Installation:
Create Migrations:
cards
table:cardables
table:Define Models:
Define Nova Resource:
Run Migrations:
Expected Outcome:
The polymorphic relationships should be set up correctly, and data should be inserted into the
cardables
table without any SQL errors.Actual Outcome:
I encountered the following error:
Beta Was this translation helpful? Give feedback.
All reactions