✨ Cockpit integration
This commit is contained in:
@@ -68,8 +68,9 @@ class CockpitApi
|
||||
/**
|
||||
* @throws GuzzleException
|
||||
* @throws Exception
|
||||
* @return Article[]
|
||||
*/
|
||||
public function getArticles(): Article|array
|
||||
public function getArticles(): array
|
||||
{
|
||||
$res = $this->client->request('GET', $this->getApiPath('itemsByModel', ['model' => 'article']), [
|
||||
'headers' => [
|
||||
@@ -130,7 +131,6 @@ class CockpitApi
|
||||
$return = [];
|
||||
foreach ($array['data'] as $data) {
|
||||
$json = json_encode($data);
|
||||
dump($json);
|
||||
$return[] = SerializerBuilder::create()->build()->deserialize($json, $type, 'json');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user