New @times directive #50623
Unanswered
marknuyens
asked this question in
Ideas
Replies: 2 comments
-
This could be simplified to: @foreach (range(0, 1) as $i)
<x-icon class="size-10 fill-red-500 />
@endforeach And I wonder, how many cases of production code need the exact same HTML (from inside |
Beta Was this translation helpful? Give feedback.
0 replies
-
You're right by suggesting this feature might not be the most popular, but I did run into a few situations and I was curious if anyone else had a similar experience. Other than that, I do think my directive would provide a more elegant syntax as opposed to But again, I would totally understand if there was little need for this. Just throwing it out there ;-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I've encountered a few occasions where I wanted to repeat some part of my Blade markup. For example:
I figured that this could be easily converted into a
@times
directive:This would result in:
Arguments against may include simplicity, but that may very well also be an argument for using this. Also, if you're anything like me, remembering the
for
loop syntax can sometimes be tricky - this would help simplify this.Anyway, curious to what y'all think, 😄
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions