Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Is this just not possible also?

Thanks Wayne

Last updated 2 years ago.
0

I am wondering this myself. I don't believe it's possible to do unless I am missing something

Last updated 2 years ago.
0

I had this problem when trying to port some old code/db to Laravel 4.

Laravel 4 doesn't support composite keys, aka multiple primary keys.

The alternative is to use multiple tables and then use the relationship ties, MorphToMany, BelongsTo, etc

Or you can extend the Eloquent and alter the getRecord to allow the bluff the extra keys, but the primary key still has to be set to a single key. (from my bookmarks, http://forumsarchive.laravel.io/viewtopic.php?pid=34475)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.