MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/snap.cafsinfotech.in/database/factories/ProjectFactory.php
<?php

namespace Database\Factories;

use App\Models\Priority;
use App\Models\Project;
use Illuminate\Database\Eloquent\Factories\Factory;

class ProjectFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Project::class;

    public function definition(): array
    {
        return [
            'company_id' => fake()->numberBetween(1, 10),
            'name' => fake()->sentence(3),
            'description' => fake()->paragraph,
            'important' => fake()->boolean,
            'source' => 'internal',
            'default_priority_id' => fn () => Priority::orderByRaw('RAND()')->first()->id,
            'created_at' => now()
        ];
    }
}