/** * Handle the signup with invite. * * @param string|null $code * * @return \Illuminate\View\View */ public function getSignup($code = null) { if ($code === null) { //throw new NotFoundHttpException(); } $invite = Invite::where('code', '=', $code)->first(); if (!$invite || $invite->claimed()) { //throw new BadRequestHttpException(); } return View::make('signup')->withCode($invite ? $invite->code : '')->withUsername(Binput::old('username'))->withEmail(Binput::old('emai', $invite ? $invite->email : '')); }
/** * Handle the signup with invite. * * @param string|null $code * * @return \Illuminate\View\View */ public function getSignup($code = null) { if (is_null($code)) { throw new NotFoundHttpException(); } $invite = Invite::where('code', '=', $code)->first(); if (!$invite || $invite->claimed()) { throw new BadRequestHttpException(); } return View::make('signup')->withPageTitle(Setting::get('app_name'))->withAboutApp(Markdown::convertToHtml(Setting::get('app_about')))->withCode($invite->code)->withUsername(Binput::old('username'))->withEmail(Binput::old('emai', $invite->email)); }