Skip to content

Commit ba90958

Browse files
committed
feat: simple ArraySerializer
1 parent 038acff commit ba90958

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Jiannei/laravel-response.
5+
*
6+
* (c) Jiannei <longjian.huang@foxmail.com>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
10+
*/
11+
12+
namespace Jiannei\Response\Laravel\Support\Serializers;
13+
14+
class SimpleArraySerializer extends ArraySerializer
15+
{
16+
/**
17+
* Serialize a collection.
18+
*
19+
* @param string $resourceKey
20+
* @param array $data
21+
* @return array
22+
*/
23+
public function collection($resourceKey, array $data)
24+
{
25+
return $data;
26+
}
27+
}

0 commit comments

Comments
 (0)