Skip to content
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

$loop variable not working #26

Closed
huubl opened this issue Jul 12, 2020 · 2 comments
Closed

$loop variable not working #26

huubl opened this issue Jul 12, 2020 · 2 comments

Comments

@huubl
Copy link
Contributor

huubl commented Jul 12, 2020

Hi,

It seem like the $loop variable isn't available. I can't figure out why, shouldn't it be available?

@if ($items)
  <ul>
    @foreach ($items as $item)
      {{$loop->count}}
    @endforeach
  </ul>
@else
  <p>No items found!</p>
@endif
@Log1x
Copy link
Owner

Log1x commented Jul 12, 2020

yeah it should. what kind of field? I'm going to try to push a fix for widgets today that might be related (#25)

Log1x added a commit that referenced this issue Jul 15, 2020
enhance(contracts): Add contracts for unique composer types
@huubl
Copy link
Contributor Author

huubl commented Jul 16, 2020

I figured it out, I returned the data wrong way. Now it's working as expected!

@huubl huubl closed this as completed Jul 16, 2020
Log1x added a commit that referenced this issue Jul 29, 2020
* chore(filesystem): Remove unneeded filesystem instance
* fix(widget): Fix widget registration, hook priority, & data (Fixes #25, #26)
* fix(block): Fix block view rendering (Fixes #27, #30)
* enhance(contracts): Add contracts for unique composer type
* fix(register): Fix registration callbacks
* fix(blocks): Fix block view path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants