*/ class BookmarkFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Bookmark::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, 'name' => $this->faker->sentence, 'content' => $this->faker->text, 'created_at' => $now->toDateTimeString(), 'updated_at' => $now->toDateTimeString(), ]; } }