library laravel-eloquent-compound-keys
This helps using eloquent when using compound keys in the database
sebwas/laravel-eloquent-compound-keys
This helps using eloquent when using compound keys in the database
- Friday, June 17, 2016
- by sebwas
- Repository
- 1 Watchers
- 0 Stars
- 62 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 7 Versions
- 0 % Grown
Laravel Eloquent compound keys support
Usage
In your Model that uses the compound keys, simply put use SebWas\Laravel\Eloquent\CompoundKeys;
.
If another Model is referencing this through a HasManyThrough relationship, use the SebWas\Laravel\Eloquent\CompoundKeysRelationship
trait with it., (*1)
Limits
There are a few limits to this, that can be solved by overriding the functions and re-implementing them properly.
- The static destroy
can't be called
- The morphTo
relationship won't work
- HasManyThrough's getHasCompareKey
doesn't work
- Some other functions, especially on relations may be buggy, (*2)
dev-master
9999999-dev
This helps using eloquent when using compound keys in the database
Sources
Download
MIT
The Requires
The Development Requires
v1.0.4
1.0.4.0
This helps using eloquent when using compound keys in the database
Sources
Download
MIT
The Requires
The Development Requires
dev-dev
dev-dev
This helps using eloquent when using compound keys in the database
Sources
Download
MIT
The Requires
The Development Requires
v1.0.3
1.0.3.0
This helps using eloquent when using compound keys in the database
Sources
Download
MIT
The Requires
The Development Requires
v1.0.2
1.0.2.0
This helps using eloquent when using compound keys in the database
Sources
Download
MIT
The Requires
The Development Requires
v1.0.1
1.0.1.0
This helps using eloquent when using compound keys in the database
Sources
Download
MIT
The Requires
The Development Requires
v1.0.0
1.0.0.0
This helps using eloquent when using compound keys in the database
Sources
Download
MIT
The Requires
The Development Requires