Skip to content

Commit

Permalink
remove unusual higher layer
Browse files Browse the repository at this point in the history
  • Loading branch information
omar.fawzy committed Jul 5, 2022
1 parent 677149b commit 0492601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Modules/Api/Transformers/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ abstract class Transformer
{
abstract public function transform(Model $model, ApiWith $apiWith): array;

public function transformCollection(Collection $collection, Pagination $paginationParameter, ApiWith $apiWith): array
public function transformCollection(Collection $collection, Pagination $pagination, ApiWith $apiWith): array
{
$result = ['entities' => [], 'cursor' => null];

Expand All @@ -21,7 +21,7 @@ public function transformCollection(Collection $collection, Pagination $paginati
}

if ($collection->isNotEmpty()){
$result['cursor'] = base64_encode($collection->last()->{$paginationParameter->sortBy});
$result['cursor'] = base64_encode($collection->last()->{$pagination->sortBy});
}

return $result;
Expand Down

0 comments on commit 0492601

Please sign in to comment.