I'm having trouble with my blade templates. For some reason, I get the content of my view printed out twice, once by the yield
where I would expect but also another time before the view that is extended performs any action.
My route is:
Route::get('/', array('as' => 'home', function () {
return View::make('default');
}));
The default view (default.blade.php
) is this:
@extends('test')
@section('title')
Default
@show
@section('content')
<p>Content goes here<p>
@show
And the test view (test.blade.php
) is this:
<h1>Anything above should be be there!</h1>
<h3>@yield('title')</h3>
@yield('content')
And this generates:
Default
<p>Content goes here<p>
<h1>Anything above should be be there!</h1>
<h3>Default</h3>
<p>Content goes here<p>