How to disable registration new users in Laravel
Stefan Izdrail
Founder & Senior Architect · 2026-06-29
With the rise of security threats, privacy concerns, and increasing regulation in different industries, it's not uncommon for web applications to restrict who can create new accounts. In Laravel, you might want to disable new user registrations while still allowing existing users to log in. This blog post will walk you through a simple process that disables registration forms, routes, and associated controllers without affecting login functionalities.
Disable User Registration
Firstly, navigate to the Laravel project's root folder. Open the
config/auth.phpfile and search for the "default" section in the array.Find the
'register' => true, which enables user registration by default. Change its value to false, making it'register' => false. This will disable new registrations altogether.Save the changes and close the file. Now refresh the app, ensuring no user can register a new account through the default routes or forms.
Navigate to the Laravel project's root folder. Open the
resources/views/authdirectory.Delete or comment out the
'register' => trueline in theRegisterController.phpfile. This will prevent Laravel from rendering the default registration form when users visit that route.Save and close the file. Now, refresh your application, and check if the 'Register' link is no longer visible or accessible to visitors.
Disable Registration but Maintain Login Functionalities
To disable registration forms, routes, and controllers only while keeping login functionalities intact:Navigate to the Laravel project's root folder. Open the
routes/web.phpfile.Comment out or remove the following lines:
'GET|POST' => 'auth/register','GET' => 'auth/login',, and'POST' => 'auth/authenticate',Save the changes, close the file, and refresh your application. Now, you won't see any registration forms or links in the app.
Finally, navigate to the Laravel project's root folder again. Open the
config/auth.phpfile and search for the "default" section. Edit the following lines in line with your requirements:'confirm' => false,, to disable account confirmation.'passwords' => true,to enable password reset functionality.'verify_email' => false,to disable email verification for existing users.
Save the changes and close the file. Refresh your app, ensuring no new user can register or perform specific account management operations.