2019-03-28 22:35:35 +01:00
|
|
|
<?php
|
2019-05-11 05:32:07 +02:00
|
|
|
/**
|
2020-09-06 11:38:10 +02:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2019-05-11 05:32:07 +02:00
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2021-01-03 22:54:54 +01:00
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
2019-05-11 05:32:07 +02:00
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
2019-03-28 22:35:35 +01:00
|
|
|
|
|
|
|
namespace App\Transformers;
|
|
|
|
|
|
|
|
use League\Fractal\Serializer\ArraySerializer as FractalArraySerializer;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class ArraySerializer.
|
|
|
|
*/
|
|
|
|
class ArraySerializer extends FractalArraySerializer
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param string $resourceKey
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function collection($resourceKey, array $data)
|
|
|
|
{
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $resourceKey
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function item($resourceKey, array $data)
|
|
|
|
{
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
}
|