Skip to content

Instantly share code, notes, and snippets.

@Kindari
Created January 23, 2013 09:41
Show Gist options
  • Select an option

  • Save Kindari/4603727 to your computer and use it in GitHub Desktop.

Select an option

Save Kindari/4603727 to your computer and use it in GitHub Desktop.
@section('content')
Some Content
@endsection
@section('title')
Some Content | @parent
@endsection
<html>
<head>
<title>
@section('title')
Some Title
@yield_section
</title>
</head>
<body>
@yield('content')
</body>
</html>
Route::get('foobar', function(){
$layout = View::make('layout');
$layout->content = View::make('content');
return $layout;
//or return View::make('layout')->nest('content', 'content');
});
Route::get('some_ajax_call', function(){
return View::make('content');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment