Package Data | |
---|---|
Maintainer Username: | mpociot |
Maintainer Contact: | m.pociot@gmail.com (Marcel Pociot) |
Package Create Date: | 2016-05-17 |
Package Last Update: | 2020-11-18 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:17:14 |
Package Statistics | |
---|---|
Total Downloads: | 43,254 |
Monthly Downloads: | 145 |
Daily Downloads: | 14 |
Total Stars: | 34 |
Total Watchers: | 3 |
Total Forks: | 5 |
Total Open Issues: | 2 |
This is a small trait that I use in my projects, if I need support for composite keys in my Eloquent models.
Install via composer:
composer require mpociot/laravel-composite-key
Then use the trait in your model:
class MyModel extends Model
{
use HasCompositeKey;
protected $primaryKey = ['foo', 'bar'];
}