ldc-crm/database/factories/ClaimSubjectFactory.php
2025-07-28 09:07:54 +02:00

30 lines
617 B
PHP

<?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::pluck('id')),
];
}
}