-
Notifications
You must be signed in to change notification settings - Fork 0
Templates
Aaron Lord edited this page May 12, 2013
·
4 revisions
Filename: app/views/layouts/master.php
<!doctype html>
<html>
<body>
<header>
<nav>
<ul>
@section('nav')
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact Us</a></li>
@show
</ul>
</nav>
</header>
<div class="container" role="main">
@yield('content')
</div>
</body>
</html>Filename: app/views/hello.php
@layout('layouts.master')
@section('content')
<p>This is my websites main content.</p>
@stop
@section('nav')
@parent
<li><a href="#">Blog</a></li>
@stop Greetings {{ $name }},
how're you on this glorious {{ data('l', time()) }}.
Here is some {{{ $escaped }}} data. @if ($foo == 'foo')
Great example.
@elseif ($bar == 'bar)
Seriously.
@else
I don't even.
@endif @for ($i = 0; $i < 10; $i++)
Counting: {{ $i }}
@endfor
@while (true)
Forever.
@endwhile
@foreach ($people as $person)
Hey {{ $person }}, how're you?
@endforeach
@forelse ($people as $person)
Hey {{ $person }}, how're you?
@empty
No people :(
@endforelse