engelsystem/db/factories/MessageFactory.php

26 lines
599 B
PHP
Raw Permalink Normal View History

2021-07-10 00:59:20 +02:00
<?php
declare(strict_types=1);
2021-07-10 00:59:20 +02:00
namespace Database\Factories\Engelsystem\Models;
use Engelsystem\Models\Message;
use Engelsystem\Models\User\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class MessageFactory extends Factory
{
/** @var string */
protected $model = Message::class; // phpcs:ignore
2021-07-10 00:59:20 +02:00
public function definition(): array
2021-07-10 00:59:20 +02:00
{
return [
'user_id' => User::factory(),
'receiver_id' => User::factory(),
'read' => $this->faker->boolean(),
'text' => $this->faker->text(),
];
}
}