Push to Register form or hide it from Login form

This commit is contained in:
Bubka
2020-11-24 16:54:19 +01:00
parent 241bd1873a
commit 7df763073b
4 changed files with 38 additions and 28 deletions

View File

@@ -49,7 +49,8 @@ class RegisterController extends Controller
{
// check if a user already exists
if( DB::table('users')->count() > 0 ) {
return response()->json(['message' => __('errors.already_one_user_registered')], 400);
// return response()->json(['message' => __('errors.already_one_user_registered')], 400);
throw \Illuminate\Validation\ValidationException::withMessages(['taken' => __('errors.already_one_user_registered')]);
}
$this->validator($request->all())->validate();