feat(Mail template & Membership relationship)

This commit is contained in:
2026-02-16 14:16:52 +01:00
parent 45920c083e
commit 6e73c82787
37 changed files with 1374 additions and 169 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Database\Factories;
use App\Models\NotificationTemplate;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<NotificationTemplate>
*/
class NotificationTemplateFactory extends Factory
{
protected $model = NotificationTemplate::class;
public function definition(): array
{
return [
'identifier' => $this->faker->unique()->slug(2),
'name' => $this->faker->sentence(3),
'subject' => $this->faker->sentence(),
'body' => $this->faker->paragraph(),
'variables' => ['name' => 'Nom'],
'is_active' => true,
];
}
public function inactive(): static
{
return $this->state(fn (array $attributes) => [
'is_active' => false,
]);
}
}