added support for named layouts.

This commit is contained in:
Taylor Otwell 2012-02-01 08:38:12 -06:00
parent 3c016285a1
commit 8bd740d183
1 changed files with 5 additions and 0 deletions

View File

@ -293,6 +293,11 @@ protected function filters($event, $method)
*/
public function layout()
{
if (starts_with($this->layout, 'name: '))
{
return View::of(substr($this->layout, 6));
}
return View::make($this->layout);
}