<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

class CourseListFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'header' => $this->faker->name(),
            'body' => $this->faker->paragraph(),
            'layout' => $this->faker->firstName(),
            'show_profiles' => $this->faker->boolean(),
            'profiles_title' => $this->faker->name(),
        ];
    }

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