Php 如何从dir伪造图像?拉维尔
如何用dir中的图像伪造图像? 当我运行播种机,然后运行终端中没有显示 我在工厂的代码Php 如何从dir伪造图像?拉维尔,php,mysql,laravel,factory,Php,Mysql,Laravel,Factory,如何用dir中的图像伪造图像? 当我运行播种机,然后运行终端中没有显示 我在工厂的代码 class RoomFactory extends Factory { protected $model = Room::class; public function definition() { return [ .. 'img1'=>$this->faker->image(public_path('rooms'),640,480, null, fa
class RoomFactory extends Factory
{
protected $model = Room::class;
public function definition()
{
return [
..
'img1'=>$this->faker->image(public_path('rooms'),640,480, null, false),
'img2'=>$this->faker->image(public_path('rooms'),640,480, null, false),
'img3'=>$this->faker->image(public_path('rooms'),640,480, null, false),
..
];
}
}
我在播种机中的代码
public function run()
{
Room::factory()->times(10)->create();
}