You won't find too much informations about Blade sadly. You can look here, maybe you will find some info:
http://culttt.com/2014/03/03/model-presenters-laravel-4/
About $this->layout. It works that way so you specify it in your controller eg $this->layout = 'layouts.frontend'. Then in your layouts.frontend view you can specify @yield('content') tag in somewhere(most likely in content block of page). And in your controller method you can use
protected $layout = 'layouts.frontend';
public function someRoute(){
$view = \View::make('auth.login'); //this is partial view
$this->layout->content = $view; //here you inject this part view to layout 'content' section
}
There are many approaches to templating, but I use 3 layers(learnt from Symfony 2). You have master layout, then some more specific layout like layout.frontend which extends your master layout, then you have specific pages like profile view which gets injected into your frontend layout. This way you are flexible about what you want to have in views. Code above is one of methods of extending layout. The other way is using @extends('layouts.frontend') which will do the same job.
Also learned about blade and layouts this make me work on layouts. you can easily makes your layout using blade http://tutsnare.com/create-layout-in-laravel-using-blade-templating/ A fully structured layouts tutorial i found.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community