-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could a way to loop through a query for a regular schedule i.e. $openingHours->forWeek(); be included within the Usage section please? #51
Comments
That's really odd, since the method simply returns an array. Could you share a full code snippet that doesn't work as expected, or PR a failing test? |
Sure! Here's what I have: The method in controller:
And in the view:
Result: |
I really appreciate your time and help @sebastiandedeyne. Thanks! |
https://github.com/spatie/opening-hours/blob/master/src/OpeningHoursForDay.php |
Attemping to use a foreach loop to display the results of the query:
$openingHours->forWeek();
returns an empty result. On the other hand,dd($openingHours->forWeek())
returns the array as expected.The text was updated successfully, but these errors were encountered: