Skip to content

Commit 1b1523c

Browse files
committed
🎨 Update Unit Testing And Model
1 parent 559f8a8 commit 1b1523c

File tree

6 files changed

+31
-5
lines changed

6 files changed

+31
-5
lines changed

app/Models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class User extends Authenticatable
1919
*/
2020
protected $fillable = [
2121
'name',
22-
// 'email',
22+
'email',
2323
'username',
2424
'password',
2525
'created_by',

database/factories/UserFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function definition()
2828
'username' => $this->faker->userName,
2929
// 'email' => $this->faker->unique()->safeEmail(),
3030
'email_verified_at' => now(),
31-
'password' => Hash::make('password'),
31+
'password' => Hash::make('password'), // password
3232
'remember_token' => Str::random(10),
3333
];
3434
}

resources/lang/en/auth.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
'register' => 'Register',
2727
'username' => 'Username',
2828
'password' => 'Password',
29+
'phone' => 'Phone',
2930
'changePassword' => 'Change Password',
3031
'terms' => 'I agree with the terms and conditions'
31-
];
32+
];

resources/lang/id/auth.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
'register' => 'Daftar',
2727
'username' => 'Nama Pengguna',
2828
'password' => 'Kata Sandi',
29+
'phone' => 'No Telepon',
2930
'changePassword' => 'Ganti Kata Sandi',
3031
'terms' => 'Saya setuju dengan syarat dan ketentuan'
31-
];
32+
];

resources/views/auth/register.blade.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,30 @@
3636
@enderror
3737
</div>
3838

39+
<div class="row">
40+
<div class="form-group col-6">
41+
<div class="d-block">
42+
<label for="email" class="control-label">{{ __('Email') }}</label>
43+
</div>
44+
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email"
45+
tabindex="3" required autocomplete="email">
46+
@error('email')
47+
<div class="invalid-feedback">
48+
{{ $message }}
49+
</div>
50+
@enderror
51+
</div>
52+
<div class="form-group col-6">
53+
<label for="phone" class="control-label">{{ __('auth.phone') }}</label>
54+
<input id="phone" type="text" class="form-control" name="phone" required>
55+
@error('phone')
56+
<div class="invalid-feedback">
57+
{{ $message }}
58+
</div>
59+
@enderror
60+
</div>
61+
</div>
62+
3963
<div class="row">
4064
<div class="form-group col-6">
4165
<div class="d-block">

tests/Feature/AuthenticationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ public function test_users_can_not_authenticate_with_invalid_password()
4444

4545
$this->assertGuest();
4646
}
47-
}
47+
}

0 commit comments

Comments
 (0)