Laravel 7/ 6 Disable Register URL Example

Laravel 6 , Laravel , Laravel 7

Nicesnippets

37198

05-02-2020


Hi Guys

In this blog, I will explain to how to disable registration route in laravel 7/ 6. We can also register remove Authentication Routes from route file.i will disable register create custom route in laravel 7/ 6.

We will used register for default Auth::routes() in my web.php file. I Will used to auth remove register routes from route file.you can easy to disable register.

Here the following example of disable register

Example: 1


Now this example in register false for add in auth route in create in web.php('routes/web.php') file.

following path:/routes/web.php

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

Example: 2

Here this example in register disable for add in custom route in create in web.php('routes/web.php') file.

following path:/routes/web.php

// Authentication Routes...

Route::get('login', 'Auth\[email protected]')->name('login');

Route::post('login', 'Auth\[email protected]');

Route::post('logout', 'Auth\[email protected]')->name('logout');

// Registration Routes...

Route::get('register', 'Auth\[email protected]')->name('register');

Route::post('register', 'Auth\[email protected]');

// Password Reset Routes...

Route::get('password/reset', 'Auth\[email protected]')->name('password.request');

Route::post('password/email', 'Auth\[email protected]')->name('password.email');

Route::get('password/reset/{token}', 'Auth\[email protected]')->name('password.reset');

Route::post('password/reset', 'Auth\[email protected]')->name('password.update');

// Email Verification Routes...

Route::get('email/verify', 'Auth\[email protected]')->name('verification.notice');

Route::get('email/verify/{id}', 'Auth\[email protected]')->name('verification.verify');

Route::get('email/resend', 'Auth\[email protected]')->name('verification.resend');

It will help you...


Recommended Posts