- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
public function index(Request $request)
{
$user = User::find(Auth::user()->id);
if($request->method() == 'POST') {
$user->username = $request->post('username');
$user->email = $request->post('email');
$user->save();
return redirect()->to(route('account.settings'));
}
return view('Account::settings.index', ['user' => $user]);
}