Use Faker methods
Accessing Faker properties was deprecated in Faker 1.14.
This commit is contained in:
@@ -24,8 +24,8 @@ class ArticleFactory extends Factory
|
|||||||
'slug' => $this->faker->slug(),
|
'slug' => $this->faker->slug(),
|
||||||
'publish_at' => $publishDate,
|
'publish_at' => $publishDate,
|
||||||
'content' => $this->faker->paragraphs(3, true),
|
'content' => $this->faker->paragraphs(3, true),
|
||||||
'user_id' => $this->faker->uuid,
|
'user_id' => $this->faker->uuid(),
|
||||||
'hero' => $this->faker->uuid,
|
'hero' => $this->faker->uuid(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ class EventFactory extends Factory
|
|||||||
return [
|
return [
|
||||||
'title' => $this->faker->sentence(),
|
'title' => $this->faker->sentence(),
|
||||||
'location' => $this->faker->randomElement(['online', 'physical']),
|
'location' => $this->faker->randomElement(['online', 'physical']),
|
||||||
'address' => $this->faker->address,
|
'address' => $this->faker->address(),
|
||||||
'start_at' => $startDate,
|
'start_at' => $startDate,
|
||||||
'end_at' => $endDate,
|
'end_at' => $endDate,
|
||||||
'publish_at' => $publishDate,
|
'publish_at' => $publishDate,
|
||||||
'status' => $this->faker->randomElement(['draft', 'soon', 'open', 'closed', 'cancelled']),
|
'status' => $this->faker->randomElement(['draft', 'soon', 'open', 'closed', 'cancelled']),
|
||||||
'registration_type' => $this->faker->randomElement(['none', 'email', 'link', 'message']),
|
'registration_type' => $this->faker->randomElement(['none', 'email', 'link', 'message']),
|
||||||
'registration_data' => $this->faker->sentence(),
|
'registration_data' => $this->faker->sentence(),
|
||||||
'hero' => $this->faker->uuid,
|
'hero' => $this->faker->uuid(),
|
||||||
'content' => $this->faker->paragraphs(3, true),
|
'content' => $this->faker->paragraphs(3, true),
|
||||||
'price' => $this->faker->numberBetween(0, 150),
|
'price' => $this->faker->numberBetween(0, 150),
|
||||||
'ages' => $this->faker->regexify('\d+(\+|\-\d+)?'),
|
'ages' => $this->faker->regexify('\d+(\+|\-\d+)?'),
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ class MediaFactory extends Factory
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'title' => $this->faker->sentence(),
|
'title' => $this->faker->sentence(),
|
||||||
'name' => storage_path('app/public/') . $this->faker->slug() . '.' . $this->faker->fileExtension,
|
'name' => storage_path('app/public/') . $this->faker->slug() . '.' . $this->faker->fileExtension(),
|
||||||
'mime_type' => $this->faker->mimeType,
|
'mime_type' => $this->faker->mimeType(),
|
||||||
'user_id' => $this->faker->uuid,
|
'user_id' => $this->faker->uuid(),
|
||||||
'size' => $this->faker->numberBetween(1000, 1000000),
|
'size' => $this->faker->numberBetween(1000, 1000000),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user