diff --git a/system/db/eloquent.php b/system/db/eloquent.php index 8b67cfea..a705cc5b 100644 --- a/system/db/eloquent.php +++ b/system/db/eloquent.php @@ -369,12 +369,7 @@ abstract class Eloquent { { $model = $this->$key(); - if (in_array($this->relating, array('has_one', 'belongs_to'))) - { - return $this->ignore[$key] = $model->first(); - } - - return $this->ignore[$key] = $model->get(); + return $this->ignore[$key] = (in_array($this->relating, array('has_one', 'belongs_to'))) ? $model->first() : $model->get(); } return (array_key_exists($key, $this->attributes)) ? $this->attributes[$key] : null;