Add username to register form
This commit is contained in:
parent
40c2053314
commit
d1b44529df
3 changed files with 17 additions and 1 deletions
|
@ -50,6 +50,7 @@ class RegisterController extends Controller
|
|||
{
|
||||
return Validator::make($data, [
|
||||
'name' => 'required|string|max:255',
|
||||
'username' => 'required|alpha_dash|min:2|max:15|unique:users',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
]);
|
||||
|
@ -65,6 +66,7 @@ class RegisterController extends Controller
|
|||
{
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'username' => $data['username'],
|
||||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue