Laravel Remove Register Route Example
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...
- How to Notifications With database Driver in Laravel 11?
- How to Send Email Via Notification in Laravel 11?
- How to Install and Configure Laravel 11 Debugbar?
- How to Like Dislike System in Laravel 11?
- How to Paginate a Model with Relationship in Laravel 11?
- Laravel 11 Upload Files to Amazon S3 Example
- Laravel 11 Send WhatsApp Messages Example
- Laravel 11 Rest API Authentication Using JWT Tutorial