/** * Show the application login form. * * @return \Illuminate\Http\Response */ public function getLogin() { if (view()->exists('auth.authenticate')) { return view('auth.authenticate'); } $tae = Courier::where('code', 'TAE')->get()->first(); return view('auth.login', ['institutions' => $tae->institutions()->orderBy('name')->get()->lists('full_name', 'id')]); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { # We only want each user to edit their own password (or admins) if (!Auth::user()->admin && Auth::user()->id != $id) { return Redirect::route('home'); } $tae = Courier::where('code', 'TAE')->with('institutions')->get()->first(); return view('users.edit', ['user' => User::find($id), 'institutions' => $tae->institutions->lists('full_name', 'id')]); }