public function profile() { $user = User::find(self::userId()); if (Request::isMethod('GET')) { return View::make("user.profile", ['user' => $user]); } else { if (User::profileSave($user)) { AuthController::setUserSession($user); } return Redirect::to('profile'); } }