compilerSelect())->pluck('class'); return [ 'country' => Country::factory()->create()->id, 'dateFrom' => $this->faker->date(), 'dateUntil' => $this->faker->date(), 'eventName' => $this->faker->words(3, true), 'members' => [Member::factory()->defaults()->create()->id], 'type' => $this->faker->randomElement($compilers), 'zipLocation' => $this->faker->city, ]; } public function toBase64(): string { return base64_encode(rawurlencode(json_encode($this->create()))); } /** * @param class-string $type */ public function type(string $type): self { return $this->state(['type' => $type]); } }