Skip to content

Commit

Permalink
Output tour image URLs [MA-156]
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiltri committed Feb 26, 2024
1 parent 1510e21 commit fd51d9c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/Models/Transformers/TourTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class TourTransformer extends TransformerAbstract
public function transform(TwillModelContract $tour): array
{
$gallery = $tour->gallery;
$thumbnail = $tour->image('upload', 'thumbnail');
$image = $tour->image('upload');

return [
'title' => $tour->title,
'nid' => (string) $tour->id,
Expand All @@ -23,8 +26,8 @@ public function transform(TwillModelContract $tour): array
'longitude' => $gallery?->longitude,
'floor' => $gallery?->floor,
'image_url' => $tour->image_url,
'thumbnail_full_path' => $tour->thumbnail_full_path,
'large_image_full_path' => $tour->large_image_full_path,
'thumbnail_full_path' => $thumbnail,
'large_image_full_path' => $image,
'selector_number' => (string) $tour->selector?->number,
'description' => $tour->description,
'intro' => $tour->intro,
Expand Down

0 comments on commit fd51d9c

Please sign in to comment.