Replies: 1 comment
-
You can define table name in the Model belonging to the table. |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Heyho,
I have a project that has a db with columns named in camelCase. Probably not the most common thing, but it's consistent and I imagine that's not the only database not sticking with snake_case. Sooo....
I'd still like to use relations without defining the foreign keys explicitly. Like:
as it is possible by sticking to snake_casing.
Illuminate\Database\Eloquent\Concerns\HasRelationships
andIlluminate\Database\Eloquent\Model
very explicitly useStr::snake()
, so apparently there is no way of changing that behaviour.And just to be clear, I don't mean attributes and
snakeAttributes = false
, I mean the actual column names in the actual database.Is there something I overlooked?
If I haven't, is that worth proposing as a feature? I mean, I probably already read most parts of the code to be touched.
Beta Was this translation helpful? Give feedback.
All reactions