Skip to content

Commit 9adb7bc

Browse files
authored
Update contact factory #30
1 parent c8f34f6 commit 9adb7bc

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

database/factories/ContactFactory.php

+3-13
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,17 @@
99

1010
class ContactFactory extends Factory
1111
{
12-
/**
13-
* The name of the factory's corresponding model.
14-
*
15-
* @var string
16-
*/
1712
protected $model = Contact::class;
1813

19-
/**
20-
* Define the model's default state.
21-
*
22-
* @return array
23-
*/
2414
public function definition()
2515
{
2616
return [
2717
'form_type' => $this->faker->randomElement(['contact', 'reservation', 'parties', 'groups', 'employment']),
28-
'user_id' => randomOrCreate(app('user')),
2918
'location_id' => randomOrCreate(app('location')),
19+
'email' => $this->faker->email,
20+
'first_name' => $this->faker->firstName,
21+
'last_name' => $this->faker->lastName,
3022
'phone' => '555-555-5555',
31-
'participants' => $this->faker->numberBetween(10, 200),
32-
'requested_date' => $this->faker->dateTimeBetween($startDate = 'now', $endDate = '+6 months')->format('Y-m-d'),
3323
'company_name' => $this->faker->company,
3424
'message' => $this->faker->paragraph,
3525
];

0 commit comments

Comments
 (0)