Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sarimziaa1's avatar

sarimziaa1 wrote a reply+100 XP

4mos ago

Undefined variable: hours and another

It looks like the issue is coming directly from the page at where the $hours variable (and possibly others) is not being defined or passed before the @foreach($hours as $hour) loop runs. This usually happens when the controller doesn’t send the data to the view or the variable name doesn’t match, which explains why fixing one error leads to another showing up on the same URL—once one missing variable is corrected, the next undefined one is exposed www.bstationhd.app