How to Disable New User Registration in Laravel

Published on February 11, 2020 29 sec read

In this short article, I would like to share how to disable new user registration in Laravel. Let’s see the way:

For New Versions

This method will work for new versions of Laravel. This method works might be from 5.6/5.7.

Open routes > web.php and simply change:



Auth::routes(['register' => false]);

Using this method, you’re able to disable/enable register, reset password and email verification routes. Here’s the example:

  'register' => false, // Register Route
  'reset' => false, // Reset Password Route
  'verify' => false, // Email Verification Route

For Older Versions

If the first method doesn’t work on your Laravel app, try this method. Open AuthController or RegisterController (find any of this from your app) and simply modify showRegistrationForm() and register() methods.

public function showRegistrationForm()
    return redirect('login');

public function register()
    // empty

Monthly Newsletter

One email a month, packed with the latest tutorials, delivered straight to your inbox.
We'll never send any spam or promotional emails.

Hey, I'm Md Obydullah. I build open-source projects and write article on Laravel, Linux server, modern JavaScript and more on web development.