mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 07:02:34 +01:00
19 lines
548 B
PHP
19 lines
548 B
PHP
<?php namespace App\Ninja\Serializers;
|
|
|
|
use League\Fractal\Serializer\ArraySerializer as FractalArraySerializer;
|
|
|
|
class ArraySerializer extends FractalArraySerializer
|
|
{
|
|
public function collection($resourceKey, array $data)
|
|
{
|
|
return $data;
|
|
//return ($resourceKey && $resourceKey !== 'data') ? array($resourceKey => $data) : $data;
|
|
}
|
|
|
|
public function item($resourceKey, array $data)
|
|
{
|
|
return $data;
|
|
//return ($resourceKey && $resourceKey !== 'data') ? array($resourceKey => $data) : $data;
|
|
}
|
|
}
|