Laravel 4 - Multiple templates in a view -
my goal use big master view several nested views.
what tried (careful : code doesn't work, makes first view)
master.blade.php
<div id="application" class="container"> @yield('first_block') @yield('second_block') </div>
first_blok.blade.php
@extends('master') @section('first_block') <!-- lots of html --> @stop
same second_blok.blade.php
then in routes :
route::get('/', function(){ return view::make('first_block'); return view::make('second_block'); });
any ideas how make work ?
it seems using templates wrong way go @ this. solved problem @include blade function.
<div id="application" class="container"> @include('first_block') @include('second_block') </div>
Comments
Post a Comment