1234567891011121314151617181920212223242526272829 |
- <?php
- namespace Database\Factories;
- use App\Models\Post;
- use Illuminate\Database\Eloquent\Factories\Factory;
- class PostFactory extends Factory
- {
-
- protected $model = Post::class;
-
- public function definition()
- {
- return [
- 'title' => trim($this->faker->sentence, '.'),
- 'content' => $this->faker->paragraphs(3, true),
- ];
- }
- }
|