Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Blade tips
Instead of if and isset, directly isset Laravel v5.4
@isset($aVar)
// if (isset($aVar))
@else
// else
@endisset
Loops
@foreach ($users as $user)
@if ($loop->first)
This is the first iteration.
@endif
@if ($loop->last)
This is the last iteration.
@endif
<p>This is user {{ $user->id }}</p>
@endforeach
@arturmamedov

This comment has been minimized.

Copy link
Owner Author

commented May 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.