Use the Dashboard canRegister function to determine whether the register function should be allowed instead of implementing the same logic twice

This commit is contained in:
Kevin MacMartin 2019-12-03 00:11:44 -05:00
parent a9acd16507
commit 74cebe30f5

View file

@ -1,5 +1,6 @@
<?php
use App\Dashboard;
use App\Utilities\Language;
/*
@ -19,7 +20,7 @@ use App\Utilities\Language;
|--------------------------------------------------------------------------
*/
Route::auth([ 'register' => env('REGISTRATION', false) === true || env('REGISTRATION', false) === \Request::ip() ]);
Route::auth([ 'register' => Dashboard::canRegister() ]);
Route::get('/logout', 'Auth\LoginController@logout');
/*