add column unique numbering scheme, more efficient selects
This commit is contained in:
@@ -10,7 +10,7 @@ class BaseModel extends Model
|
||||
{
|
||||
public function getAttribute($key)
|
||||
{
|
||||
if (! $key) {
|
||||
if ($this->exists && ! $key) {
|
||||
throw new \LogicException("No attribute ".var_export($key, true));
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class BaseModel extends Model
|
||||
*/
|
||||
public function getRelationValue($key)
|
||||
{
|
||||
if (!method_exists($this, $key)) {
|
||||
if ($this->exists && !method_exists($this, $key)) {
|
||||
throw new \LogicException("No attribute or relation ".var_export($key, true));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user