Looking to hire Laravel developers? Try LaraJobs

laravel-faker-image maintained by galka

Description
The package for Laravel complements the fake image generation methods.
Last update
2023/05/17 07:40 (dev-main)
License
Links
Downloads
8

Comments
comments powered by Disqus

The package for Laravel complements the fake image generation methods.

To generate images, you can use the LoremFlickr service.

You can also generate an image randomly from the Fixtures folder

Installation

  • composer require galka/laravel-faker-image

Publish

  • php artisan vendor:publish --provider='Galka\FakerImageGenerator\Providers\FakerImageProvider'

Factory usage

  • will generate a 600 * 600 image in the storage/images directory with an image of a dog:

$this->faker->imageLoremFlickr('images', 600, 600, 'dog')

  • generate a random image from the test/Fixtures folder

$this->faker->imageRandomFromFixtures('images/products', false),