http://stackoverflow.com/questions/25115720/undefined-variable-title-in-laravel
Yes, it´s works, but don´t exist most elegant method?
with laravel 4.1 just need:
public function index(){
$this->layout->title = 'Index Title';
return View::make('pages.index');
}
with laravel 4.2 must:
public function index(){
$this->layout->title = 'Index Title';
return View::make('pages.index')->with('title,$this->layout->title);
}
why?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community