Skip to content

Commit

Permalink
Merge branch 'main' into craft-5
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Mar 12, 2024
2 parents fa93e60 + 3a91f6e commit e19fba7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ return [
'criteria' => ['section' => 'news'],
'transformer' => function(Entry $entry) {
return [
'id' => $entry->id,
'title' => $entry->title,
'url' => $entry->url,
'jsonUrl' => UrlHelper::url("news/{$entry->id}.json"),
'jsonUrl' => UrlHelper::url("news/$entry->id.json"),
'summary' => $entry->summary,
];
},
Expand All @@ -76,6 +77,7 @@ return [
},
]
];

```

### Endpoint Configuration Settings
Expand Down Expand Up @@ -393,7 +395,7 @@ Here are a few endpoint examples, and what their response would look like.
return [
'title' => $entry->title,
'url' => $entry->url,
'jsonUrl' => UrlHelper::url("ingredients/{$entry->slug}.json"),
'jsonUrl' => UrlHelper::url("ingredients/$entry->slug.json"),
];
},
'pretty' => true,
Expand Down

0 comments on commit e19fba7

Please sign in to comment.