aboutsummaryrefslogblamecommitdiff
path: root/database/factories/PostFactory.php
blob: 0b005302898e0826445446b088327cc615e12ae5 (plain) (tree)





























                                                     
<?php

namespace Database\Factories;

use App\Models\Post;
use Illuminate\Database\Eloquent\Factories\Factory;

class PostFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Post::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'title' => $this->faker->title,
            'author' => $this->faker->name,
            'text' => $this->faker->text,
        ];
    }
}