🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 TicketMessageFactory.php

📁 Path: /home/skhata/new.chandrapharma.com/database/factories/TicketMessageFactory.php
📊 Size: 1.09 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php

namespace Database\Factories;

use App\Modules\Support\Models\SupportTicket;
use App\Modules\Support\Models\TicketMessage;
use App\Modules\User\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

class TicketMessageFactory extends Factory
{
    protected $model = TicketMessage::class;

    public function definition(): array
    {
        return [
            'ticket_id'       => SupportTicket::factory(),
            'user_id'         => User::factory(),
            'body'            => fake()->paragraph(),
            'attachments'     => [],
            'is_staff_reply'  => false,
            'is_internal_note'=> false,
            'read_at'         => null,
        ];
    }

    public function staffReply(): static
    {
        return $this->state(['is_staff_reply' => true]);
    }

    public function internalNote(): static
    {
        return $this->state([
            'is_staff_reply'   => true,
            'is_internal_note' => true,
        ]);
    }

    public function read(): static
    {
        return $this->state(['read_at' => now()->subMinutes(5)]);
    }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨