Fed by the records themselves, delivered only to public HTTPS addresses checked at every attempt, retried, and switched off after repeated failures. A submitter's details travel only to webhooks that opted into them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
596 B
PHP
28 lines
596 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Webhook;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends Factory<Webhook>
|
|
*/
|
|
class WebhookFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => $this->faker->words(2, true),
|
|
'url' => 'https://hooks.example.org/'.Str::random(8),
|
|
'secret' => Str::random(40),
|
|
'events' => ['*'],
|
|
'include_personal_data' => false,
|
|
'is_active' => true,
|
|
];
|
|
}
|
|
}
|