Skip to content

Instantly share code, notes, and snippets.

@zsitro
Last active August 29, 2015 14:22
Show Gist options
  • Save zsitro/3d0152d9b43197fcb60c to your computer and use it in GitHub Desktop.
Save zsitro/3d0152d9b43197fcb60c to your computer and use it in GitHub Desktop.
Laravel things

Redirects & routes

{{route('auth.select_user_type', 'customer')}}
return Redirect::route('login');
return Redirect::to('user/login');

Blade

Inline condition

{{ ($cat) ? 'meow' : "zZzzZ" }}

Check if section has content and use it in a conditional

{{ (array_key_exists('header', View::getSections()) ) ? 'has-header' : '' }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment