Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Magic Method for setting model attributes.
- */
- public function __set($key, $value)
- {
- // If the key is a relationship, add it to the ignored attributes.
- // Ignored attributes are not stored in the database.
- if (method_exists($this, $key))
- {
- $this->ignore[$key] = $value;
- }
- else
- {
- if($this->attributes[$key] !== $value) $this->dirty[$key] = $value;
- $this->attributes[$key] = $value;
- }
- }
Add Comment
Please, Sign In to add comment