protected function generatePaginatedResponse($resources, array $metadada = [])
    {
        $paginationData = $this->generatePaginationData($resources);

        $data = [
            'data' => $this->transformer->transformCollection($resources->items()),
        ];

        return Response::json(array_merge($metadada, $paginationData, $data), 200);
    }
protected function generatePaginatedResponse($resources, array $metadada = [])
    {
        $paginationData = $this->generatePaginationData($resources);

        $data = [
            'data' => $this->transformer->transformCollection($resources->items()),
        ];

        return Response::json(array_merge($metadada, $paginationData, $data), 200);
    }
protected function generatePaginatedResponse ( $ resources , array $ metadada = [ ] ) { $ paginationData = $ this -> generatePaginationData ( $ resources ) ; $ data = [ 'data' => $ this -> transformer -> transformCollection ( $ resources -> items ( ) ) , ] ; return Response :: json ( array_merge ( $ metadada , $ paginationData , $ data ) , 200 ) ; }
Generated a paginated Response

@param $resources
@param array $metadada
@return \Illuminate\Http\JsonResponse
@internal param $resource
Generated a paginated Response