Skip to content

Instantly share code, notes, and snippets.

@Tim-Machine
Created May 30, 2013 19:28
Show Gist options
  • Select an option

  • Save Tim-Machine/5680455 to your computer and use it in GitHub Desktop.

Select an option

Save Tim-Machine/5680455 to your computer and use it in GitHub Desktop.
example of non working blade/theme/controller layout configuration If you remove sidebar content works. If sidebar is there "variable 'content' cant be found"
<?php
class ExampleController extends BaseController{
protected $layout = "master.layout"
protected $themePath = "/some/path/"
funcion index()
{
$data['user'] = "some user"
View::addNamespace('theme', $this->themePath);
$this->layout->content = View::make('theme::index');
$this->layout->sidebar = View::make('theme::sidebar',$data);
}
}
<?php
#master/layout.blade.php
{{$content}}
{{$sidebar}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment