validate($request, [ 'name' => 'required', 'email' => 'required|email', // "confirmed" uses _confirmation. 'password' => 'required|confirmed', ]); // Create user. This would give us a clear password. // $user = User::create($request->only(['name', 'email', 'password'])); $user = User::create([ 'name' => $request->get('name'), 'email' => $request->get('email'), 'password' => bcrypt($request->get('password')), ]); // Sign user in. auth()->login($user); // Redirect to home page. return redirect()->home(); } }