Files
test_polis/laravel/database/factories/CommentFactory.php
2026-02-04 23:23:42 +07:00

27 lines
571 B
PHP

<?php
namespace Database\Factories;
use App\Models\Article;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Comment>
*/
class CommentFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'article_id' => Article::factory(),
'author_name' => $this->faker->name,
'content' => $this->faker->sentence,
];
}
}