fix eloquent model attribute resolution.
This commit is contained in:
parent
7f9e38a770
commit
eda46a815e
|
@ -54,7 +54,7 @@
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'profiler' => true,
|
'profiler' => false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -698,11 +698,11 @@ public function __call($method, $parameters)
|
||||||
// to perform the appropriate action based on the method.
|
// to perform the appropriate action based on the method.
|
||||||
if (starts_with($method, 'get_'))
|
if (starts_with($method, 'get_'))
|
||||||
{
|
{
|
||||||
return $this->attributes[substr($method, 4)];
|
return $this->get_attribute(substr($method, 4));
|
||||||
}
|
}
|
||||||
elseif (starts_with($method, 'set_'))
|
elseif (starts_with($method, 'set_'))
|
||||||
{
|
{
|
||||||
$this->attributes[substr($method, 4)] = $parameters[0];
|
$this->set_attribute(substr($method, 4), $parameters[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally we will assume that the method is actually the beginning of a
|
// Finally we will assume that the method is actually the beginning of a
|
||||||
|
|
Loading…
Reference in New Issue