Method 1: Disable Registration Via Laravel Fortify
If you installed Laravel with Fortify then you can change config/fortify.php configuration and comment out the "Features::registration()" features.
<?php 'features' => [ // Features::registration(), // --------> comment out this Features::resetPasswords(), // Features::emailVerification(), Features::updateProfileInformation(), Features::updatePasswords(), Features::twoFactorAuthentication(), ],
Method 2: Set Register Route to False
The 2nd method is to set the registration route to false and you can easily do so from within the "routes/web.php" file itself.
<?php Auth::routes(['register' => false]);
Method 3: Redirect User to Somewhere Else
The 3rd method is to redirect user to somewhere else after accessing the "/register" path and you can do so from within the "routes/web.php".
<?php // Redirect from register page to home page Route::get('/register', function () { return redirect('/'); });
Leave a reply