Recommend this page to a friend! |
Classes of Thiago Przyczynski | Eloquent Composite Primary Key | README.md | Download |
|
DownloadEloquent Composite KeyPackage to enable composite key support on Eloquent Models. InstallationInstall it with composer:
UsageDefine the primaryKey as an array and use the HasCompositeKey trait on your model.
The idea of this package is to allow eloquent models to use composite keys despite that Eloquent doesn't support it officially (see https://laravel.com/docs/8.x/eloquent#composite-primary-keys). |