I am running a website on Laravel and it was working fine on local system as well as on server previously.
Suddenly, this website has stopped and not working for few pages. On debugging or checking error log, I have found an error related to "Maximum function nesting level reached".
To find out for what thing, I am getting this error, i have debugged the code and found the below lines for which I am getting this error:
$customer = \App\Models\Customers\Customer::find(123);
echo $customer->toJson(); //Getting error for this line
Also tried to use toArray() instead of toJson(), but getting same error.
Now, I am not able to understand, why I am getting nesting level issue for just fetching only 1 record from database. Even customer table has few columns with not so much big data.
Can someone please help me? what is the reason behind the same?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire