Skip to content

Commit

Permalink
feat: simple ArraySerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
jiannei committed Sep 27, 2021
1 parent 038acff commit ba90958
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/Support/Serializers/SimpleArraySerializer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/*
* This file is part of the Jiannei/laravel-response.
*
* (c) Jiannei <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Jiannei\Response\Laravel\Support\Serializers;

class SimpleArraySerializer extends ArraySerializer
{
/**
* Serialize a collection.
*
* @param string $resourceKey
* @param array $data
* @return array
*/
public function collection($resourceKey, array $data)
{
return $data;
}
}

0 comments on commit ba90958

Please sign in to comment.