Files
website/website/database/factories/TicketReplyFactory.php
Claude Dev 6f39c32270 Add standalone support ticket system with customer and admin interfaces
Replaces planned SupportPal integration with a built-in ticket system.
Customer side: create tickets, reply, close. Admin side: manage all
tickets with search/filters, staff replies, status updates. Includes
30 Pest tests (144 total, 775 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:20:12 -05:00

37 lines
850 B
PHP

<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\SupportTicket;
use App\Models\TicketReply;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\TicketReply>
*/
class TicketReplyFactory extends Factory
{
protected $model = TicketReply::class;
/** @return array<string, mixed> */
public function definition(): array
{
return [
'ticket_id' => SupportTicket::factory(),
'user_id' => User::factory(),
'body' => fake()->paragraphs(2, true),
'is_staff_reply' => false,
];
}
public function staffReply(): static
{
return $this->state(fn (array $attributes): array => [
'is_staff_reply' => true,
]);
}
}