Skip to content

Commit a72edde

Browse files
tdondichtaylorotwell
authored andcommitted
[5.4] Add setKeyType() method to Eloquent abstract Model (#18354)
* Add missing setKeyType method to Eloquent abstract Model. (#18353) * Update Model.php
1 parent d767c87 commit a72edde

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/Illuminate/Database/Eloquent/Model.php

+14-1
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ public function getQualifiedKeyName()
11051105
}
11061106

11071107
/**
1108-
* Get the auto incrementing key type.
1108+
* Get the auto-incrementing key type.
11091109
*
11101110
* @return string
11111111
*/
@@ -1114,6 +1114,19 @@ public function getKeyType()
11141114
return $this->keyType;
11151115
}
11161116

1117+
/**
1118+
* Set the data type for the primary key.
1119+
*
1120+
* @param string $type
1121+
* @return $this
1122+
*/
1123+
public function setKeyType($type)
1124+
{
1125+
$this->keyType = $type;
1126+
1127+
return $this;
1128+
}
1129+
11171130
/**
11181131
* Get the value indicating whether the IDs are incrementing.
11191132
*

0 commit comments

Comments
 (0)