Skip to content

All topics  /  Laravel

Laravel Remove Register Route Example

Laravel ·

Hi Guys.

In this example,I will learn you how to remove register route in laravel, you can simply and easy to remove register route.

As we know laravel provide Auth::routes() for all login, registration, reset password and email verification. You can use default following routes lists instead of Auth::routes().

Create Route


Auth::routes();

to:

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

Modify Controller

Open AuthController or RegisterController simply modify showRegistrationForm() and register() methods.

public function showRegistrationForm()
{
    return redirect('login');
}
public function register()
{
    // empty
}

It will Help you...