Skip to content

Commit c4957ca

Browse files
committed
WIP
1 parent 77927a1 commit c4957ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Console/Commands/SyncArticleImages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ public function handle(): void
3232
Article::published()->chunk(100, function ($articles) {
3333
$articles->each(function ($article) {
3434
if ($article->hasHeroImage()) {
35-
$article->hero_image_url = $this->getUnsplashImageUrlFromStringId($article->hero_image);
35+
$article->hero_image_url = $this->generateUnsplashImageUrlFromStringId($article->hero_image);
3636
$article->save();
3737
}
3838
});
3939
});
4040
}
4141

42-
protected function getUnsplashImageUrlFromStringId(string $imageId): ?string
42+
protected function generateUnsplashImageUrlFromStringId(string $imageId): ?string
4343
{
4444
$response = Http::retry(3, 100, null, false)->withToken($this->accessKey, 'Client-ID')
4545
->get("https://api.unsplash.com/photos/{$imageId}");

0 commit comments

Comments
 (0)