Add salutation field to contacts #13

This commit is contained in:
2025-10-29 13:53:08 +01:00
parent a34226c6a9
commit 59c2b9c28c
10 changed files with 26 additions and 13 deletions
+5 -2
View File
@@ -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();