Commit 5a1741e9 authored by Taylor Otwell's avatar Taylor Otwell

Merge pull request #1276 from rk/rk-issue-1261

[#1261] get_key now pulls from $original instead
parents 4eac00a0 f148f621
...@@ -544,7 +544,7 @@ abstract class Model { ...@@ -544,7 +544,7 @@ abstract class Model {
*/ */
public function get_key() public function get_key()
{ {
return $this->get_attribute(static::$key); return array_get($this->original, static::$key);
} }
/** /**
...@@ -721,7 +721,7 @@ abstract class Model { ...@@ -721,7 +721,7 @@ abstract class Model {
{ {
if (array_key_exists($key, $this->$source)) return true; if (array_key_exists($key, $this->$source)) return true;
} }
if (method_exists($this, $key)) return true; if (method_exists($this, $key)) return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment