Commit 144117c0 authored by Taylor Otwell's avatar Taylor Otwell

cleaning up the eloquent model class.

parent 7c9228b4
...@@ -662,10 +662,12 @@ abstract class Model { ...@@ -662,10 +662,12 @@ abstract class Model {
*/ */
public function __call($method, $parameters) public function __call($method, $parameters)
{ {
$meta = array('key', 'table', 'connection', 'sequence', 'per_page');
// If the method is actually the name of a static property on the model we'll // If the method is actually the name of a static property on the model we'll
// return the value of the static property. This makes it convenient for // return the value of the static property. This makes it convenient for
// relationships to access these values off of the instances. // relationships to access these values off of the instances.
if (in_array($method, array('key', 'table', 'connection', 'sequence', 'per_page'))) if (in_array($method, $meta))
{ {
return static::$$method; return static::$$method;
} }
......
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