eee
This commit is contained in:
+3
-9
@@ -57,9 +57,7 @@ class Relation extends Component
|
|||||||
if (Context::exists($_identification)) {
|
if (Context::exists($_identification)) {
|
||||||
return Context::get($_identification);
|
return Context::get($_identification);
|
||||||
}
|
}
|
||||||
$activeModel = $this->_query[$_identification]->first();
|
return Context::set($_identification, $this->_query[$_identification]->first());
|
||||||
unset($this->_query[$_identification]);
|
|
||||||
return Context::set($_identification, $activeModel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -72,9 +70,7 @@ class Relation extends Component
|
|||||||
if (Context::exists($_identification)) {
|
if (Context::exists($_identification)) {
|
||||||
return Context::get($_identification);
|
return Context::get($_identification);
|
||||||
}
|
}
|
||||||
$activeModel = $this->_query[$_identification]->count();
|
return Context::set($_identification, $this->_query[$_identification]->count());
|
||||||
unset($this->_query[$_identification]);
|
|
||||||
return Context::set($_identification, $activeModel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -88,9 +84,7 @@ class Relation extends Component
|
|||||||
if (Context::exists($_identification)) {
|
if (Context::exists($_identification)) {
|
||||||
return Context::get($_identification);
|
return Context::get($_identification);
|
||||||
}
|
}
|
||||||
$activeModel = $this->_query[$_identification]->get();
|
return Context::set($_identification, $this->_query[$_identification]->get());
|
||||||
unset($this->_query[$_identification]);
|
|
||||||
return Context::set($_identification, $activeModel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user