From 035c8181ad747bf95782881c00cca5ae5eda7fdb Mon Sep 17 00:00:00 2001 From: jedi Date: Sun, 15 Dec 2019 18:06:02 +0100 Subject: [PATCH] declare primary keys on all models --- app/Container.php | 3 +++ app/Event.php | 2 ++ app/Item.php | 3 +++ 3 files changed, 8 insertions(+) diff --git a/app/Container.php b/app/Container.php index 3d961e2..26d63e4 100644 --- a/app/Container.php +++ b/app/Container.php @@ -17,6 +17,9 @@ class Container extends Model 'cid', 'name' ]; + + protected $primaryKey = 'cid'; + /** * The attributes excluded from the model's JSON form. * diff --git a/app/Event.php b/app/Event.php index f545b65..2f99288 100644 --- a/app/Event.php +++ b/app/Event.php @@ -16,6 +16,8 @@ class Event extends Model 'eid', 'name', 'slug', 'start', 'end', 'pre_start', 'post_end' ]; + + protected $primaryKey = 'eid'; /** * The attributes excluded from the model's JSON form. * diff --git a/app/Item.php b/app/Item.php index c2d2be8..8c619b3 100644 --- a/app/Item.php +++ b/app/Item.php @@ -18,6 +18,9 @@ class Item extends Model 'iid', 'item_uid', 'bezeichnung', 'wann', 'wo', 'eid', 'cid' ]; + + protected $primaryKey = 'iid'; + /** * The attributes excluded from the model's JSON form. *