-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[Question] @forelse and other missing #49
Comments
Not sure. But I'd 👍 to see it brought back for sure. |
There was a slight bug in @forelse actually and I just wanted to address it. I do plan to try to bring it back in. |
👍 |
1 similar comment
👍 |
Well that's what I do of course but that adds a lot of clutter. |
|
Been battling with the forelse loop for upwards of an hour till I saw this. Thanks @gkunno @if (count($artist->albums) > 0)
@foreach ($artist->albums as $artistalbum)
{{ $artistalbum->albumTitle }}
@endforeach
@else
This artist has no albums
@endif |
@taylorotwell, want kind of trickiness is involved? |
SMARTY (optional else): {foreach $myArray as $item}
<li>{$item}</li>
{foreachelse}
<li>Nothing to show</li>
{/foreach} HANDLEBARS (optional else): {{#each myArray}}
<li>{{this}}</li>
{{else}}
<li>Nothing to show</li>
{{/each}} why not BLADE?
|
Because it is deprecated, that's why. I'm sure you can handle it. |
Feature/user overview endpoint
Apply fixes from StyleCI
Fix Total Downloads badge in readme
A lot of Blade was trimmed down in the making of Laravel 4, and while some I can do without, I found the @forelse loop really useful and clean, is there any plan to bring it back ?
The text was updated successfully, but these errors were encountered: