add column unique numbering scheme, more efficient selects

This commit is contained in:
2018-08-04 19:57:59 +02:00
parent 69bda25bbb
commit fabc3ad24e
23 changed files with 452 additions and 173 deletions
+2 -2
View File
@@ -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));
}