Skip to content

Commit 58e5b43

Browse files
add fallback
1 parent 1e573c4 commit 58e5b43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Resources/Articles/ArticleResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function toArray(Request $request): array
1818
return [
1919
'id' => $this->id,
2020
'title' => $this->title,
21-
'cover_photo_url' => $this->cover_photo_url,
21+
'cover_photo_url' => $this->cover_photo_url ?? '#',
2222
'description' => Str::of($this->content)
2323
->stripTags()
2424
->limit(200),

0 commit comments

Comments
 (0)