hatchetaustralia / fakerphp-loremflickr-kittens
Alternative image provider for fakerphp using loremflickr.com
Fund package maintenance!
hatchetaustralia
Installs: 4 524
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- fakerphp/faker: ^1.10
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.8
Suggests
- ext-curl: *
README
Introduction
Alternative image provider for fakerphp using loremflickr.com
This package has been forked from smknstd/fakerphp-picsum-images
Installation
You can install the package via composer in dev dependency section:
composer require --dev hatchetaustralia/fakerphp-loremflickr-kittens
Usage
$faker = \Faker\Factory::create(); $faker->addProvider(new \Hatchet\FakerLoremFlickrKittens\FakerLoremFlickrKittensProvider($faker)); // return a string that contains a url like 'https://loremflickr.com/800/600/kitten' $faker->imageUrl($width = 800, $height = 600); // download a properly sized image from LoremFlickr into a file with a file path like '/tmp/13b73edae8443990be1aa8f1a483bc27.jpg' $filePath= $faker->image($dir = '/tmp', $width = 640, $height = 480);
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.