1
0
Fork 0
mirror of https://github.com/archtechx/airwire-demo.git synced 2025-12-12 00:24:03 +00:00
airwire-demo/database/factories/ReportFactory.php
2021-05-21 18:38:26 +02:00

32 lines
721 B
PHP

<?php
namespace Database\Factories;
use App\Models\Report;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class ReportFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Report::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->sentence,
'assignee_id' => User::all()->random(),
'category' => $this->faker->randomElement([1, 2, 3]),
'status' => $this->faker->randomElement(['pending', 'resolved', 'invalid']),
];
}
}