Skip to content

Commit

Permalink
Ability to disable register route (#25556)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cannonb4ll authored and taylorotwell committed Sep 10, 2018
1 parent a602ac4 commit aac6144
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Illuminate/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,10 @@ public function auth(array $options = [])
$this->post('logout', 'Auth\LoginController@logout')->name('logout');

// Registration Routes...
$this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'Auth\RegisterController@register');
if ($options['register'] ?? true) {
$this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'Auth\RegisterController@register');
}

// Password Reset Routes...
$this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
Expand Down

0 comments on commit aac6144

Please sign in to comment.