Skip to content

Commit

Permalink
[5.4] Add setKeyType() method to Eloquent abstract Model (#18354)
Browse files Browse the repository at this point in the history
* Add missing setKeyType method to Eloquent abstract Model.  (#18353)

* Update Model.php
  • Loading branch information
tdondich authored and taylorotwell committed Mar 16, 2017
1 parent d767c87 commit a72edde
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ public function getQualifiedKeyName()
}

/**
* Get the auto incrementing key type.
* Get the auto-incrementing key type.
*
* @return string
*/
Expand All @@ -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.
*
Expand Down

0 comments on commit a72edde

Please sign in to comment.