Answer the question
In order to leave comments, you need to log in
Why is it impossible to access the connection through a getter?
Hello!
I create a connection in the model:
function getTest(){
return $this->hasOne( ... );
}
Answer the question
In order to leave comments, you need to log in
Because if you access it as an attribute, this is one thing, but as a method, it's another.
$model->test analog of $model->getTest()->one()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question