Share your relevant code with us.
Jun 22, 2017
6
Level 1
PHP Timeout, Eloquent relationship references parent model
Im experiencing a php timeout error because it takes more than 30 seconds. I have a model (person) that hasMany (connections) which eager loads a hasOne (person) in the connections model. The timeout only occurs on the hasOne (Person) in the connections model. If I change the hasOne in the connections model to use another model instead of person, it works fine. I have experienced this before when a relationship references the original (parent) model, but if it references something else, it works fine too.
Please or to participate in this conversation.