Files
UNIT3D-Community-Edition/database/factories/NoteFactory.php
2022-01-10 17:03:50 -05:00

32 lines
680 B
PHP

<?php
/* @var \Illuminate\Database\Eloquent\Factory $factory */
namespace Database\Factories;
use App\Models\Note;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class NoteFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Note::class;
/**
* Define the model's default state.
*/
public function definition(): array
{
return [
'user_id' => fn () => User::factory()->create()->id,
'staff_id' => fn () => User::factory()->create()->id,
'message' => $this->faker->text(),
];
}
}