Add salutation field to contacts #13
This commit is contained in:
@@ -20,9 +20,12 @@ public function definition()
|
||||
$avatar = "https://i.pravatar.cc/128?img={$randomImageId}";
|
||||
}
|
||||
|
||||
$gender = rand(0, 9) >= 5 ? 'female' : 'male';
|
||||
|
||||
return [
|
||||
'first_name' => $this->faker->firstName(),
|
||||
'last_name' => $this->faker->lastName(),
|
||||
'salutation' => $this->faker->title($gender),
|
||||
'first_name' => $this->faker->firstName($gender),
|
||||
'last_name' => $this->faker->lastName($gender),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'phone' => $this->faker->phoneNumber(),
|
||||
'position' => $this->faker->jobTitle(),
|
||||
|
||||
@@ -11,6 +11,7 @@ public function up()
|
||||
Schema::create('contacts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('customer_id')->constrained()->onDelete('cascade');
|
||||
$table->string('salutation', 20);
|
||||
$table->string('first_name', 50);
|
||||
$table->string('last_name', 50);
|
||||
$table->string('email', 100)->nullable();
|
||||
|
||||
Reference in New Issue
Block a user