*/ class BoostFactory extends Factory { /** * @return array */ public function definition(): array { return [ 'press_release_id' => PressRelease::factory(), 'user_id' => User::factory(), 'days' => 7, 'credits_charged' => 12, 'starts_at' => now(), 'ends_at' => now()->addDays(7), ]; } public function expired(): static { return $this->state(fn (): array => [ 'starts_at' => now()->subDays(14), 'ends_at' => now()->subDay(), ]); } }