added unless structure to blade.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
- [Added `$hidden` static variable to the base Eloquent model](/docs/database/eloquent#to-array).
|
||||
- [Added `sync` method to has\_many\_and\_belongs\_to Eloquent relationship](/docs/database/eloquent#sync-method).
|
||||
- [Added `save` method to has\_many Eloquent relationship](/docs/database/eloquent#has-many-save).
|
||||
- [Added `unless` structure to Blade template engine](/docs/views/templating#blade-unless).
|
||||
- Migrated to the Symfony HttpFoundation component for core request / response handling.
|
||||
- Fixed the passing of strings into the Input::except method.
|
||||
- Fixed replacement of optional parameters in URL::transpose method.
|
||||
|
||||
@@ -105,6 +105,19 @@ Blade makes writing your views pure bliss. To create a blade view, simply name y
|
||||
There are not posts in the array!
|
||||
@endforelse
|
||||
|
||||
<a name="blade-unless"></a>
|
||||
#### The "unless" control structure:
|
||||
|
||||
@unless(Auth::check())
|
||||
{{ HTML::link_to_route('login', 'Login'); }}
|
||||
@endunless
|
||||
|
||||
// Equivalent...
|
||||
|
||||
<?php if ( ! Auth::check()): ?>
|
||||
...
|
||||
<?php endif; ?>
|
||||
|
||||
<a name="blade-layouts"></a>
|
||||
## Blade Layouts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user