File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,10 @@ return [
5151 'criteria' => ['section' => 'news'],
5252 'transformer' => function(Entry $entry) {
5353 return [
54+ 'id' => $entry->id,
5455 'title' => $entry->title,
5556 'url' => $entry->url,
56- 'jsonUrl' => UrlHelper::url("news/{ $entry->id} .json"),
57+ 'jsonUrl' => UrlHelper::url("news/$entry->id.json"),
5758 'summary' => $entry->summary,
5859 ];
5960 },
@@ -76,6 +77,7 @@ return [
7677 },
7778 ]
7879];
80+
7981```
8082
8183### Endpoint Configuration Settings
@@ -393,7 +395,7 @@ Here are a few endpoint examples, and what their response would look like.
393395 return [
394396 'title' => $entry->title,
395397 'url' => $entry->url,
396- 'jsonUrl' => UrlHelper::url("ingredients/{ $entry->slug} .json"),
398+ 'jsonUrl' => UrlHelper::url("ingredients/$entry->slug.json"),
397399 ];
398400 },
399401 'pretty' => true,
You can’t perform that action at this time.
0 commit comments