*/ class PressReleaseRedactionSnapshotFactory extends Factory { protected $model = PressReleaseRedactionSnapshot::class; public function definition(): array { return [ 'press_release_id' => PressRelease::factory(), 'encrypted_before' => [ 'title' => fake()->sentence(), 'text' => fake()->paragraph(), ], 'purge_after' => now()->addDays(30)->toDateString(), ]; } public function dueForPurge(): static { return $this->state(fn () => [ 'purge_after' => now()->subDay()->toDateString(), ]); } }