Changeset bd9e8e3 for app/Http/Controllers/Dashboard/SettingsController.php
- Timestamp:
- 10/17/21 20:28:35 (3 years ago)
- Branches:
- develop, master
- Children:
- e6c1f87
- Parents:
- d795fa6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Http/Controllers/Dashboard/SettingsController.php
rd795fa6 rbd9e8e3 18 18 "user" => auth()->user(), 19 19 "adminAndEditors" => User::where("role_id", 1)->orWhere("role_id", 2)->get(), 20 "active_tab" => "account" 20 21 ]); 21 22 } … … 23 24 public function updateUsername(UsernameSettingsRequest $request) 24 25 { 25 // if($request->validated()){ 26 // $user = auth()->user(); 27 // $user->username = $request->username; 28 // $user->save(); 29 // 30 // auth()->logout(); 31 // session()->flush(); 32 // 33 // return redirect()->route("auth.loginShow"); 34 // } 35 // else { 36 return back()->withInput(['tab'=>'security']); 37 // } 26 if ($request->validated()) { 27 $user = auth()->user(); 28 $user->username = $request->username; 29 $user->save(); 30 31 auth()->logout(); 32 session()->flush(); 33 34 return redirect()->route("auth.loginShow"); 35 } else { 36 return back()->with(['active_tab' => 'security']); 37 } 38 39 dd('no'); 38 40 } 39 41
Note:
See TracChangeset
for help on using the changeset viewer.