Commit 8685b790 by hfpp2012 yinsigan

blade if else end

1 parent 97485d4c
......@@ -30,6 +30,8 @@ class PagesController extends Controller
public function blade()
{
return view('blade.bladetest');
$gender = 'femffffale';
$text = 'Hello there!';
return view('blade.bladetest', compact('gender', 'text'));
}
}
......@@ -6,9 +6,28 @@
@section('body')
<div class="jumbotron">
<h1 class="display-3">Jumbotron heading</h1>
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn btn-lg btn-success" href="#" role="button">Sign up today</a></p>
<h1 class="display-3">
Your gender is
@if($gender == 'male')
male
@elseif($gender == 'female')
female
@else
unknown
@endif
</h1>
<p class="lead">
@unless(empty($text))
{{ $text }}
@endunless
@if(!empty($text))
{{ $text }}
@endif
</p>
<p>{{ isset($variableDoesNotExist) ? $variableDoesNotExist : 'The variable does not exist' }}</p>
<p>{{ $variableDoesNotExist or 'This really does not exist' }}</p>
</div>
<div class="row marketing">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!