ldc-crm/database/factories/ClaimSubjectFactory.php

31 lines
633 B
PHP
Raw Permalink Normal View History

<?php
namespace Database\Factories;
use App\Models\Brand;
use App\Models\ClaimSubject;
use Illuminate\Database\Eloquent\Factories\Factory;
class ClaimSubjectFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = ClaimSubject::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{
return [
'label' => $this->faker->word(),
'brand_id' => $this->faker->randomElement(Brand::query()->get()->modelKeys()),
];
}
}