23 lines
No EOL
518 B
PHP
23 lines
No EOL
518 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Category;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class PostFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'title' => fake()->sentence(),
|
|
'summary' => fake()->paragraph(),
|
|
'content' => fake()->paragraphs(3, true),
|
|
'author_id' => User::factory(),
|
|
'category_id' => Category::factory(),
|
|
];
|
|
}
|
|
}
|