|
|
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Auth; |
|
|
|
|
|
|
|
|
|
use App\Models\User; |
|
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
|
use Illuminate\Http\Request; |
|
|
|
|
use Illuminate\Support\Facades\Hash; |
|
|
|
|
use Illuminate\Support\Facades\Validator; |
|
|
|
|
use Illuminate\Foundation\Auth\RegistersUsers; |
|
|
|
@ -22,7 +23,9 @@ class RegisterController extends Controller |
|
|
|
|
| |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
use RegistersUsers; |
|
|
|
|
use RegistersUsers { |
|
|
|
|
RegistersUsers::register as register_orig; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Where to redirect users after registration. |
|
|
|
@ -41,6 +44,15 @@ class RegisterController extends Controller |
|
|
|
|
$this->middleware('guest'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function register(Request $request) |
|
|
|
|
{ |
|
|
|
|
if (!config('app.allow_regs')) { |
|
|
|
|
abort(403, "Registrations are closed."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $this->register_orig($request); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Get a validator for an incoming registration request. |
|
|
|
|
* |
|
|
|
|