public function indexAction() { if (Session::has('user')) { return Redirect::temporary(Url::href('dashboard')); } return View::create('login')->with('loginForm', static::getLoginForm()); }
public function before() { if (!Session::has('user')) { return View::create('login')->with('loginForm', IndexController::getLoginForm()); } else { $this->user = Session::get('user'); } }