Skip to content

Commit 0829099

Browse files
authored
Update entry call to string type on strapi v5
strapi v5 uses string documentId parameter https://docs.strapi.io/cms/api/rest#get
1 parent e04dc51 commit 0829099

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LaravelStrapi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public function collectionCount(string $type): int
9999
});
100100
}
101101

102-
public function entry(string $type, int $id, $fullUrls = true, array|string $populate = [], array $queryData = []): array
102+
public function entry(string $type, string $documentId, $fullUrls = true, array|string $populate = [], array $queryData = []): array
103103
{
104-
$endpoint = $this->strapiUrl . '/' . $type . '/' . $id;
104+
$endpoint = $this->strapiUrl . '/' . $type . '/' . $documentId;
105105

106106
if (!empty($populate)) {
107107
$queryData['populate'] = $populate;

0 commit comments

Comments
 (0)