eee
This commit is contained in:
+8
-9
@@ -55,11 +55,10 @@ class Relation extends Component
|
|||||||
*/
|
*/
|
||||||
public function first(string $_identification): mixed
|
public function first(string $_identification): mixed
|
||||||
{
|
{
|
||||||
if (Context::exists($_identification)) {
|
if (!Context::exists($_identification)) {
|
||||||
return Context::get($_identification);
|
Context::set($_identification, $this->_query[$_identification]->first());
|
||||||
}
|
}
|
||||||
var_dump($_identification, Context::exists($_identification));
|
return Context::get($_identification);
|
||||||
return Context::set($_identification, $this->_query[$_identification]->first());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -69,10 +68,10 @@ class Relation extends Component
|
|||||||
*/
|
*/
|
||||||
public function count(string $_identification): mixed
|
public function count(string $_identification): mixed
|
||||||
{
|
{
|
||||||
if (Context::exists($_identification)) {
|
if (!Context::exists($_identification)) {
|
||||||
return Context::get($_identification);
|
Context::set($_identification, $this->_query[$_identification]->count());
|
||||||
}
|
}
|
||||||
return Context::set($_identification, $this->_query[$_identification]->count());
|
return Context::get($_identification);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -84,9 +83,9 @@ class Relation extends Component
|
|||||||
public function get(string $_identification): mixed
|
public function get(string $_identification): mixed
|
||||||
{
|
{
|
||||||
if (Context::exists($_identification)) {
|
if (Context::exists($_identification)) {
|
||||||
return Context::get($_identification);
|
Context::set($_identification, $this->_query[$_identification]->get());
|
||||||
}
|
}
|
||||||
return Context::set($_identification, $this->_query[$_identification]->get());
|
return Context::get($_identification);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user