Files
landing-api/database/factories/ReplyTemplateFactory.php
Josep Piguillem 76d022053b Answer the inbox from the panel, with templates
A reply starts from a template filled in the language the person wrote in,
is sent by the application when it has a mailer that delivers or handed to
the replier's mail program otherwise, and is recorded on the submission.
The same is available through the API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:45:47 +02:00

29 lines
850 B
PHP

<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\ReplyTemplate;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ReplyTemplate>
*/
class ReplyTemplateFactory extends Factory
{
public function definition(): array
{
return [
'name' => $this->faker->words(3, true),
'kind' => null,
'subject' => ['es' => 'Gracias, {name}', 'en' => 'Thank you, {name}', 'ca' => 'Gràcies, {name}'],
'body' => [
'es' => "Hola {name}:\n\nGracias por escribirnos sobre «{subject}».\n\n{sender}",
'en' => "Hi {name},\n\nThank you for writing to us about \"{subject}\".\n\n{sender}",
'ca' => "Hola {name}:\n\nGràcies per escriure'ns sobre «{subject}».\n\n{sender}",
],
];
}
}