diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php
index fdf2aa4..1ff1dd9 100644
--- a/app/Actions/Fortify/CreateNewUser.php
+++ b/app/Actions/Fortify/CreateNewUser.php
@@ -40,7 +40,8 @@ public function create(array $input)
'state' => ['required', 'string'],
'zip' => ['required', 'string'],
'gender' => ['required', 'string'],
- 'dob' => ['required', 'string'],
+ 'date_of_birth' => ['required', 'string'],
+ 'country' => ['required', 'string'],
],
[
'username.unique' => 'Username already taken, please try another one',
@@ -68,7 +69,7 @@ public function create(array $input)
'state.required' => 'State is required',
'zip'=>'State is required',
'gender'=> 'Gender is required',
- 'dob'=> 'Date of birth is required',
+ 'date_of_birth'=> 'Date of birth is required',
]
)->validate();
@@ -85,13 +86,28 @@ public function create(array $input)
'created_at' => now(),
'updated_at' => now(),
]);
-
+ if($input['gender'] == 'male'){
+ $profile_image='default_male.png';
+ } else if($input['gender'] == 'female') {
+ $profile_image='default_female.png';
+ } else {
+ $profile_image='default_others.png';
+ }
Profile::create([
'user_id' => $user->id,
'created_at' => now(),
'updated_at' => now(),
+ 'address' => $input['address'],
+ 'state' => $input['state'],
+ 'zip' => $input['zip'],
+ 'gender' => $input['gender'],
+ 'profile_image' => $profile_image,
+ 'dob' => $input['date_of_birth'],
+ 'country' => $input['country'],
]);
+
+
return $user;
}
}
diff --git a/app/Models/Profile.php b/app/Models/Profile.php
index e83e915..147711f 100644
--- a/app/Models/Profile.php
+++ b/app/Models/Profile.php
@@ -18,6 +18,7 @@ class Profile extends Model
'dob',
'profile_image',
'status',
+ 'country',
];
protected $table = 'profile';
diff --git a/public/assets/img/avatars/default_female.png b/public/assets/img/avatars/default_female.png
new file mode 100644
index 0000000..6c23387
Binary files /dev/null and b/public/assets/img/avatars/default_female.png differ
diff --git a/public/assets/img/avatars/default_male.png b/public/assets/img/avatars/default_male.png
new file mode 100644
index 0000000..c2a12da
Binary files /dev/null and b/public/assets/img/avatars/default_male.png differ
diff --git a/public/assets/img/avatars/5.png b/public/assets/img/avatars/default_others.png
similarity index 100%
rename from public/assets/img/avatars/5.png
rename to public/assets/img/avatars/default_others.png
diff --git a/resources/views/auth/auth-register.blade.php b/resources/views/auth/auth-register.blade.php
index 7671c02..eca1201 100644
--- a/resources/views/auth/auth-register.blade.php
+++ b/resources/views/auth/auth-register.blade.php
@@ -9,6 +9,8 @@
@section('vendor-style')
+
+
@endsection
@section('page-style')
@@ -20,6 +22,7 @@
+
@endsection
@section('page-script')
@@ -111,9 +114,250 @@ class="app-brand-text demo text-body fw-bold ms-1">{{config('variables.templateN
-
+
@error('country')
{{ $message }}
@enderror
@@ -133,8 +377,8 @@ class="app-brand-text demo text-body fw-bold ms-1">{{config('variables.templateN
-
@error('date_of_birth')
{{ $message }}
@@ -190,7 +434,6 @@ class="app-brand-text demo text-body fw-bold ms-1">{{config('variables.templateN
-
diff --git a/resources/views/layouts/sections/navbar/navbar.blade.php b/resources/views/layouts/sections/navbar/navbar.blade.php
index b9e249b..8c918c7 100644
--- a/resources/views/layouts/sections/navbar/navbar.blade.php
+++ b/resources/views/layouts/sections/navbar/navbar.blade.php
@@ -19,7 +19,7 @@
-
{{config('variables.templateName')}}
+
{{config('variables.templateName')}}
@endif
@@ -70,7 +70,7 @@
-
+