diff --git a/src/Http/Resources/ProfileResource.php b/src/Http/Resources/ProfileResource.php index 6084e5b..e62ca05 100644 --- a/src/Http/Resources/ProfileResource.php +++ b/src/Http/Resources/ProfileResource.php @@ -12,7 +12,7 @@ * Class ProfileResource * @package Fintech\Auth\Http\Resources * - * @property-read mixed $user_profile_data + * @property-read mixed $profile_data * @property-read string $id_type * @property-read string|int $id_no * @property-read string $id_issue_country diff --git a/src/Models/Profile.php b/src/Models/Profile.php index 5037e47..d6bb7bf 100644 --- a/src/Models/Profile.php +++ b/src/Models/Profile.php @@ -22,7 +22,7 @@ class Profile extends Model protected $guarded = ['id']; - protected $casts = [ 'restored_at' => 'datetime', 'date_of_birth' => 'datetime', 'user_profile_data' => 'json']; + protected $casts = [ 'restored_at' => 'datetime', 'date_of_birth' => 'datetime', 'id_expired_at' => 'datetime', 'id_issue_at' => 'datetime', 'user_profile_data' => 'array']; /* |-------------------------------------------------------------------------- diff --git a/src/Seeders/UserSeeder.php b/src/Seeders/UserSeeder.php index 9676ba0..28c6de6 100644 --- a/src/Seeders/UserSeeder.php +++ b/src/Seeders/UserSeeder.php @@ -41,7 +41,7 @@ private function data() "marital_status" => "unmarried", "occupation" => "service", "source_of_income" => "salary", - "id_type" => "password", + "id_type" => "passport", "id_no" => "12345678", "id_issue_country" => "Bangladesh", "id_expired_at" => now()->addYears(5)->format('Y-m-d'), @@ -62,7 +62,7 @@ private function data() "present_country_id" => "1", "present_post_code" => "1234", "note" => "Testing", - "nationality" => "Bangladesh" + "nationality" => "Bangladeshi" ], [ @@ -84,7 +84,7 @@ private function data() "marital_status" => "unmarried", "occupation" => "service", "source_of_income" => "salary", - "id_type" => "password", + "id_type" => "passport", "id_no" => "12345678", "id_issue_country" => "Bangladesh", "id_expired_at" => now()->addYears(5)->format('Y-m-d'), @@ -105,7 +105,7 @@ private function data() "present_country_id" => "1", "present_post_code" => "1234", "note" => "Testing", - "nationality" => "Bangladesh" + "nationality" => "Bangladeshi" ], [ @@ -127,7 +127,7 @@ private function data() "marital_status" => "unmarried", "occupation" => "service", "source_of_income" => "salary", - "id_type" => "password", + "id_type" => "passport", "id_no" => "12345678", "id_issue_country" => "Bangladesh", "id_expired_at" => now()->addYears(5)->format('Y-m-d'), @@ -148,7 +148,7 @@ private function data() "present_country_id" => "1", "present_post_code" => "1234", "note" => "Testing", - "nationality" => "Bangladesh" + "nationality" => "Bangladeshi" ] ]; diff --git a/src/Services/UserService.php b/src/Services/UserService.php index eff3457..808897d 100644 --- a/src/Services/UserService.php +++ b/src/Services/UserService.php @@ -59,7 +59,7 @@ public function create(array $inputs = []) $user = $this->userRepository->create($userData); - $profileData['user_id'] = $user->id; + $profileData['user_id'] = $user->getKey(); $this->profileRepository->create($profileData);