Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

faker image laravel

use FakerGenerator as Faker; 
$factory->define(Product::class, function (Faker $faker) {
    return [

        'amount' => $faker->randomFloat(2, 0, 10000),
        'image' => $faker->image('public/storage/images',640,480, null, false),

    ];
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #faker #image #laravel
ADD COMMENT
Topic
Name
9+4 =