From 8a52c4529f92a57cf9714431c7c5617166aa06db Mon Sep 17 00:00:00 2001 From: Shift Date: Wed, 24 May 2023 21:32:59 +0000 Subject: [PATCH] Use Faker methods Accessing Faker properties was deprecated in Faker 1.14. --- database/factories/ArticleFactory.php | 4 ++-- database/factories/EventFactory.php | 4 ++-- database/factories/MediaFactory.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/database/factories/ArticleFactory.php b/database/factories/ArticleFactory.php index 56ee276..d6e656e 100644 --- a/database/factories/ArticleFactory.php +++ b/database/factories/ArticleFactory.php @@ -24,8 +24,8 @@ class ArticleFactory extends Factory 'slug' => $this->faker->slug(), 'publish_at' => $publishDate, 'content' => $this->faker->paragraphs(3, true), - 'user_id' => $this->faker->uuid, - 'hero' => $this->faker->uuid, + 'user_id' => $this->faker->uuid(), + 'hero' => $this->faker->uuid(), ]; } } diff --git a/database/factories/EventFactory.php b/database/factories/EventFactory.php index d4b1976..19e4d39 100644 --- a/database/factories/EventFactory.php +++ b/database/factories/EventFactory.php @@ -24,14 +24,14 @@ class EventFactory extends Factory return [ 'title' => $this->faker->sentence(), 'location' => $this->faker->randomElement(['online', 'physical']), - 'address' => $this->faker->address, + 'address' => $this->faker->address(), 'start_at' => $startDate, 'end_at' => $endDate, 'publish_at' => $publishDate, 'status' => $this->faker->randomElement(['draft', 'soon', 'open', 'closed', 'cancelled']), 'registration_type' => $this->faker->randomElement(['none', 'email', 'link', 'message']), 'registration_data' => $this->faker->sentence(), - 'hero' => $this->faker->uuid, + 'hero' => $this->faker->uuid(), 'content' => $this->faker->paragraphs(3, true), 'price' => $this->faker->numberBetween(0, 150), 'ages' => $this->faker->regexify('\d+(\+|\-\d+)?'), diff --git a/database/factories/MediaFactory.php b/database/factories/MediaFactory.php index 05244ae..e1b52d0 100644 --- a/database/factories/MediaFactory.php +++ b/database/factories/MediaFactory.php @@ -19,9 +19,9 @@ class MediaFactory extends Factory { return [ 'title' => $this->faker->sentence(), - 'name' => storage_path('app/public/') . $this->faker->slug() . '.' . $this->faker->fileExtension, - 'mime_type' => $this->faker->mimeType, - 'user_id' => $this->faker->uuid, + 'name' => storage_path('app/public/') . $this->faker->slug() . '.' . $this->faker->fileExtension(), + 'mime_type' => $this->faker->mimeType(), + 'user_id' => $this->faker->uuid(), 'size' => $this->faker->numberBetween(1000, 1000000), ]; }