*/ class PressReleaseCrawlerHitFactory extends Factory { /** * @return array */ public function definition(): array { return [ 'press_release_id' => PressRelease::factory(), 'service' => 'openai', 'user_agent' => 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)', ]; } public function service(string $service, ?string $userAgent = null): static { return $this->state([ 'service' => $service, 'user_agent' => $userAgent ?? $service.'-crawler/1.0', ]); } }