<?php

namespace Database\Factories;

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

use Illuminate\Support\Str;

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

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'header' => $this->faker->sentence,
            'body' => $this->faker->paragraph,
            'layout' => 'list',
            'count' => 10,
        ];
    }

    public function search()
    {
        return $this->state(function (array $attributes) {
            return [
                'header' => $this->faker->sentence,
                'body' => $this->faker->paragraph,
            ];
        });
    }
}
