public function create() { if (Session::has('backTo')) { Session::keep('backTo'); } // pass it forward return view('trigger.create'); }
public function create() { // keep backtrack token in the session one more step of the way. if (Session::has('backTo')) { Session::keep('backTo'); } else { Session::flash('backTo', Request::fullUrl()); } return view('medicine.create'); }
public function edit(Journal $journal) { // keep backtrack token in the session one more step of the way. if (Session::has('backTo')) { Session::keep('backTo'); } else { Session::flash('backTo', Request::fullUrl()); } $journal = $journal->load('triggers'); // Create list with name=>id to use in select2 field. $triggers = Auth::user()->triggers()->lists('name', 'id'); $medicines = Auth::user()->medicines()->lists('name', 'id'); $common_triggers = CommonTriggers::all()->lists('name', 'id'); // $pain_locations = PainLocations::all()->lists('name', 'id'); return view('journal.edit', compact('journal', 'common_triggers', 'triggers', 'medicines')); }
/** * Handle Github login. * * @return \Illuminate\Http\RedirectResponse */ public function getLoginWithGithub() { if (!Input::has('code')) { Session::keep(['url']); GithubProvider::authorize(); } else { try { $user = Github::register(Input::get('code')); Auth::login($user); if (Session::get('password_required')) { return $this->redirectRoute('user.settings', [], ['update_password' => true]); } return $this->redirectIntended(route('user.index')); } catch (GithubEmailNotVerifiedException $e) { return $this->redirectRoute('auth.register', ['github_email_not_verified' => true]); } } }
/** * If present, returns the RegisterInfoInterface which lets you access the account data * * @return RegisterInfoInterface|null */ public function getRegistration() { Session::keep(self::REGISTER_INFO_SESSION); return Session::get(self::REGISTER_INFO_SESSION); }