*/ class LikeFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Like::class; /** * Define the model's default state. * * @return array */ public function definition(): array { $now = Carbon::now()->subDays(rand(5, 15)); return [ 'url' => $this->faker->url, 'author_name' => $this->faker->name, 'author_url' => $this->faker->url, 'content' => '
' . $this->faker->realtext() . '
', 'created_at' => $now->toDateTimeString(), 'updated_at' => $now->toDateTimeString(), ]; } }