Disable Registration in Laravel 5

A new Laravel 5 installation comes with user registration out of the box. If you don’t want to use this feature, here is a clean way to disable it. Open up app\Http\Controllers\Auth\AuthController.php and add the following methods:

public function getRegister()
{
    return redirect('auth/login'); // Or wherever
}

public function postRegister()
{

}

These will override the parent methods in the AuthenticatesAndRegistersUsers trait.

Leave a Reply

Your email address will not be published. Required fields are marked *