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

📄 VendorPlanFactory.php

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

namespace Database\Factories;

use App\Modules\Payout\Models\VendorPlan;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class VendorPlanFactory extends Factory
{
    protected $model = VendorPlan::class;

    public function definition(): array
    {
        $name = fake()->words(2, true);

        return [
            'name'                    => ucwords($name),
            'slug'                    => Str::slug($name) . '-' . fake()->unique()->numberBetween(1, 9999),
            'description'             => fake()->sentence(),
            'max_products'            => fake()->numberBetween(10, 500),
            'max_images_per_product'  => fake()->numberBetween(3, 20),
            'can_use_coupons'         => false,
            'can_use_flash_sales'     => false,
            'can_access_analytics'    => false,
            'can_use_bulk_import'     => false,
            'commission_rate'         => 10.00,
            'monthly_price'           => fake()->randomFloat(2, 0, 5000),
            'yearly_price'            => fake()->randomFloat(2, 0, 50000),
            'features'                => [],
            'is_active'               => true,
            'sort_order'              => 0,
        ];
    }

    public function free(): static
    {
        return $this->state([
            'monthly_price' => 0,
            'yearly_price'  => 0,
        ]);
    }

    public function premium(): static
    {
        return $this->state([
            'can_use_coupons'      => true,
            'can_use_flash_sales'  => true,
            'can_access_analytics' => true,
            'can_use_bulk_import'  => true,
            'monthly_price'        => 1999,
            'yearly_price'         => 19999,
        ]);
    }

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