Find no longer needs to be defined on the model since the query catches it correctly.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
This commit is contained in:
parent
a68d2242d3
commit
a422e06989
|
@ -225,18 +225,6 @@ public static function update($id, $attributes)
|
||||||
return $model->query()->where($model->key(), '=', $id)->update($model->attributes);
|
return $model->query()->where($model->key(), '=', $id)->update($model->attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Find a model by its primary key.
|
|
||||||
*
|
|
||||||
* @param string $id
|
|
||||||
* @param array $columns
|
|
||||||
* @return Model
|
|
||||||
*/
|
|
||||||
public function _find($id, $columns = array('*'))
|
|
||||||
{
|
|
||||||
return $this->query()->where(static::$key, '=', $id)->first($columns);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all of the models in the database.
|
* Get all of the models in the database.
|
||||||
*
|
*
|
||||||
|
@ -762,7 +750,7 @@ public function __call($method, $parameters)
|
||||||
return static::$$method;
|
return static::$$method;
|
||||||
}
|
}
|
||||||
|
|
||||||
$underscored = array('with', 'find', 'query');
|
$underscored = array('with', 'query');
|
||||||
|
|
||||||
// Some methods need to be accessed both staticly and non-staticly so we'll
|
// Some methods need to be accessed both staticly and non-staticly so we'll
|
||||||
// keep underscored methods of those methods and intercept calls to them
|
// keep underscored methods of those methods and intercept calls to them
|
||||||
|
|
Loading…
Reference in New Issue