A couple things,
Are you using xdebug on this server? It will trigger that error sometimes. You can increase the number in the php.ini xdebug seciton with xdebug.max_nesting_level=#
The other thing is on the Cache:put('...
Cache::put('box_banner', $ret, 60);
If this is the actual code, your cache key (box_banner) is not unique so your overwriting the cache ever time the function runs. Also you have no check if cache exists then load in there so all your doing is saving a cache every time.
Putting the cache check/load/save in the _box_banner function should work for caching the data. Especially if each of result of the function is different.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community