Skip to content

Commit

Permalink
Bug fix (#16)
Browse files Browse the repository at this point in the history
* Bug fix

Bug fix for:
specialtactics/laravel-api-boilerplate#26

* Update RestfulTransformer.php

* Update RestfulTransformer.php

StyleCI ?!
  • Loading branch information
JT501 authored and specialtactics committed Sep 4, 2019
1 parent 52caecb commit 34bd751
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Transformers/RestfulTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ public function transformRestfulModel(RestfulModel $model)
}
}

/**
/*
* Primary Key transformation - all PKs to be called "id"
*/
unset($transformed[$model->getKeyName()]);
$transformed = array_merge(
['id' => $model->getKey()],
$transformed
);
unset($transformed[$model->getKeyName()]);

/*
* Transform the model keys' case
Expand Down

0 comments on commit 34bd751

Please sign in to comment.