I am trying to disable the register route on my application which is running in Laravel 5.4.
In my routes file, I have only the
Auth::routes();
Though the above solutions work but, I think changing the middleware to 'auth' in the App\Http\Controllers\Auth\RegisterController will be one of the easiest solutions. This will redirect all visitors to login page if they want to access any of the registration routes. Like this:
namespace App\Http\Controllers\Auth;
class RegisterController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}