diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php index 566e51d..aca394c 100644 --- a/app/Actions/Fortify/CreateNewUser.php +++ b/app/Actions/Fortify/CreateNewUser.php @@ -24,11 +24,15 @@ class CreateNewUser implements CreatesNewUsers 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => $this->passwordRules(), 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '', + 'nickname' => ['required', 'unique:users', 'min:4', 'max:15'], ])->validate(); +// dd($input); + return User::create([ 'name' => $input['name'], 'email' => $input['email'], + 'nickname' => $input['nickname'], 'password' => Hash::make($input['password']), ]); } diff --git a/app/Models/User.php b/app/Models/User.php index f340cca..5b7e3e0 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -27,6 +27,7 @@ class User extends Authenticatable 'name', 'email', 'password', + 'nickname', ]; /** diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index f56e5c6..11cfa78 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -20,6 +20,10 @@ return new class extends Migration $table->rememberToken(); $table->foreignId('current_team_id')->nullable(); $table->string('profile_photo_path', 2048)->nullable(); + + $table->bigInteger('money')->default(0); + $table->string('nickname'); + $table->timestamps(); }); } diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 8a5f240..918b732 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -14,6 +14,11 @@ +
+ + +
+