I'm trying to do a controller for my site in this way
class MyController extends BaseController {
public function login()
{
$this->layout->testata = View::make('OUT');
$this->layout->content = View::make('auth.login');
}
but Laravel says "Attempt to assign property of non-object". What's the problem?
Basecontroller has only the contructor
class BaseController extends Controller {
public $layout = 'a.main';
protected function setupLayout()
{
if ( ! is_null($this->layout))
{
$this->layout = View::make($this->layout);
}
}
}
Where is the problem?
via Santoo