11. Simple Method :
2 Auth::routes(['reset' => false]);
3
42. If that doesnt work, in ForgotPasswordController, you will see that a trait
5 SendsPasswordResetEmails is used, in that you will find the function
6 showLinkRequestForm which you can override:
7
8 public function showLinkRequestForm()
9 {
10 return view('auth.passwords.email');
11 }
12
13and replace it with a redirect to go back, or a 404, or something else that you
14want.
1<?php
2
3namespace App\Http\Controllers\Auth;
4
5use App\Http\Controllers\Controller;
6use Illuminate\Http\Request;
7use App\User;
8use Hash;
9
10class RegisterController extends Controller
11{
12 public function register()
13 {
14
15 return view('auth.register');
16 }
17
18 public function storeUser(Request $request)
19 {
20 $request->validate([
21 'name' => 'required|string|max:255',
22 'email' => 'required|string|email|max:255|unique:users',
23 'password' => 'required|string|min:8|confirmed',
24 'password_confirmation' => 'required',
25 ]);
26
27 User::create([
28 'name' => $request->name,
29 'email' => $request->email,
30 'password' => Hash::make($request->password),
31 ]);
32
33 return redirect('login');
34 }
35
36}