events-venues/app/Services/Faker/Image/Providers/LoremFlickr.php

26 lines
577 B
PHP

<?php
/**
* @package: events-venues-task
* @author: Yevhen Odynets
* @date: 2024-07-26
* @time: 19:48
*/
declare(strict_types=1);
namespace App\Services\Faker\Image\Providers;
use App\Services\Faker\Image\{ImageStorage, Provider};
final class LoremFlickr extends Provider
{
public function getImage(ImageStorage $storage): ?string
{
$this->url = config('image.faker.provider.loremflickr.host') .
$storage->getWidth() . "/" . $storage->getHeight() . $storage->getKeyword('/');
return $this->download($storage, $this->url);
}
}