Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@arturmamedov
Last active June 26, 2018 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arturmamedov/c1463cc316f0bb913372081a2bf0d2ad to your computer and use it in GitHub Desktop.
Save arturmamedov/c1463cc316f0bb913372081a2bf0d2ad to your computer and use it in GitHub Desktop.
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
Copy link
Author

arturmamedov commented May 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment