New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.7] Ability to disable register route #25556

merged 1 commit into from Sep 10, 2018


None yet
8 participants

Cannonb4ll commented Sep 10, 2018

Sometimes you will want to disable registering in a application, this PR makes it possible to easily disable those routes.

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

This comment has been minimized.


JeroenBoesten commented Sep 10, 2018

I feel this should've been added a long time ago, needed this more than once, and it seems like a viable option since email verification now works in the same way.

@taylorotwell taylorotwell merged commit aac6144 into laravel:5.7 Sep 10, 2018

2 checks passed

continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed

@GrahamCampbell GrahamCampbell changed the title from Ability to disable register route to [5.7] Ability to disable register route Sep 11, 2018


This comment has been minimized.


sisve commented Sep 12, 2018

This sounds like something that should have tests. It sounds like a security problem if a dev sets up a site, disable registering, and we accidentally include the register routes again.

On a separate note, should the password reset also have this type of toggle?


This comment has been minimized.


devcircus commented Sep 13, 2018

Never understood why you would hide routes behind a method anyway. Your routes file should be explicit. Quicker to do it manually than to use this new option, if you know how to use your editor.


This comment has been minimized.


browner12 commented Sep 13, 2018

yah, I personally would prefer we got rid of Auth::routes(), but I don't think that's happening anytime soon.


This comment has been minimized.


yajra commented Sep 14, 2018

Thanks @Cannonb4ll, sent a related PR #19452 but failed. Glad this went through! Less codes with clean implementation at least for me. No more if to toggle register. :)

    'verify'   => true
    'register' => config('site.registration', true),

This comment has been minimized.


shadoWalker89 commented Sep 26, 2018

@yajra yeah me too,
Done the same exact thing a long time ago #16961

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment