bilions/faker-images

Laravel faker 的伪造图像提供者

v1.0.1 2022-10-09 06:48 UTC

This package is auto-updated.

Last update: 2024-09-09 13:37:55 UTC


README

伪造图像提供者

  • 此包不使用 curl 从第三方网页链接获取图像。
  • 图像是通过 php image-gd 生成的,通常在安装 php 时已包含 gd 扩展。

示例用法

$faker->addProvider(new FakerImageProvider($faker));
$image = $faker->image(null, 640, 480);
$filePath = Storage::disk('local')->putFileAs('seeder-images', new File($image), basename($image));

欢迎贡献者