From a72edde631424a5f5fbe763831c16cd620533f4d Mon Sep 17 00:00:00 2001 From: tdondich Date: Thu, 16 Mar 2017 06:16:36 -0700 Subject: [PATCH] [5.4] Add setKeyType() method to Eloquent abstract Model (#18354) * Add missing setKeyType method to Eloquent abstract Model. (#18353) * Update Model.php --- src/Illuminate/Database/Eloquent/Model.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index c1f325f0db82..a005f1878147 100644 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -1105,7 +1105,7 @@ public function getQualifiedKeyName() } /** - * Get the auto incrementing key type. + * Get the auto-incrementing key type. * * @return string */ @@ -1114,6 +1114,19 @@ public function getKeyType() return $this->keyType; } + /** + * Set the data type for the primary key. + * + * @param string $type + * @return $this + */ + public function setKeyType($type) + { + $this->keyType = $type; + + return $this; + } + /** * Get the value indicating whether the IDs are incrementing. *