Skip to content

Commit

Permalink
Improve examples
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Mar 12, 2024
1 parent 440a9ba commit 3a91f6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
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 3a91f6e

Please sign in to comment.