Added more database fields for contacts. Worked on popovers in customers view. #3
This commit is contained in:
@@ -21,16 +21,40 @@ public function definition()
|
||||
}
|
||||
|
||||
$gender = rand(0, 9) >= 5 ? 'female' : 'male';
|
||||
|
||||
return [
|
||||
$userName = $this->faker->userName();
|
||||
$hasLinkedIn = rand(0, 9) >= 7;
|
||||
$hasMatrix = rand(0, 9) >= 7;
|
||||
$hasGithub = rand(0, 9) >= 7;
|
||||
|
||||
$contact = [
|
||||
'is_primary' => $this->faker->boolean(30),
|
||||
'salutation' => $this->faker->title($gender),
|
||||
'first_name' => $this->faker->firstName($gender),
|
||||
'last_name' => $this->faker->lastName($gender),
|
||||
'job_title' => $this->faker->jobTitle(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'phone' => $this->faker->phoneNumber(),
|
||||
'position' => $this->faker->jobTitle(),
|
||||
'is_primary' => $this->faker->boolean(30),
|
||||
'mobile_phone' => $this->faker->phoneNumber(),
|
||||
'avatar' => $avatar,
|
||||
'online_accounts' => []
|
||||
];
|
||||
|
||||
if ($hasLinkedIn) $contact[] = [
|
||||
'platform' => 'linkedin',
|
||||
'user_name' => $userName,
|
||||
'url' => 'https://www.linkedin.com/in/' . $userName
|
||||
];
|
||||
if ($hasMatrix) $contact[] = [
|
||||
'platform' => 'matrix',
|
||||
'user_name' => $userName,
|
||||
'url' => '@' . $userName . ':matrix.org'
|
||||
];
|
||||
if ($hasGithub) $contact[] = [
|
||||
'platform' => 'github',
|
||||
'user_name' => $userName,
|
||||
'url' => 'https://www.github.com/' . $userName
|
||||
];
|
||||
|
||||
return $contact;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user