Skip to content

Commit

Permalink
Merge branch '5.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 13, 2017
2 parents 8768350 + 250a3ed commit ca1da6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Compilers/BladeCompiler.php
Expand Up @@ -387,6 +387,12 @@ public function if($name, callable $callback)
: "<?php if (\Illuminate\Support\Facades\Blade::check('{$name}')): ?>";
});

$this->directive('else'.$name, function ($expression) use ($name) {
return $expression
? "<?php elseif (\Illuminate\Support\Facades\Blade::check('{$name}', {$expression})): ?>"
: "<?php elseif (\Illuminate\Support\Facades\Blade::check('{$name}')): ?>";
});

$this->directive('end'.$name, function () {
return '<?php endif; ?>';
});
Expand Down

0 comments on commit ca1da6c

Please sign in to comment.