In Laravel 4, my controller uses a Blade layout:
class PagesController extends BaseController {
protected $layout = \
class PagesController extends BaseController {
protected $layout = 'layouts.master';
public function index()
{
$this->layout->title = "Home page";
$this->layout->content = View::make('pages/index');
}
}
At the Blade Template file, REMEMBER to use @ in front the variable.
...
{{ $title or '' }}
...
@yield('content')
...