engelsystem/db/factories/NewsCommentFactory.php

26 lines
574 B
PHP
Raw 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\News;
use Engelsystem\Models\NewsComment;
use Engelsystem\Models\User\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class NewsCommentFactory extends Factory
{
/** @var string */
protected $model = NewsComment::class; // phpcs:ignore
2021-07-10 00:59:20 +02:00
public function definition(): array
2021-07-10 00:59:20 +02:00
{
return [
'news_id' => News::factory(),
'user_id' => User::factory(),
'text' => $this->faker->text(),
];
}
}