Created
September 14, 2016 05:35
-
-
Save kamaulynder/c26a31a5641e741a6c3b647bbda1167c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace RollCall\Http\Transformers; | |
use League\Fractal\TransformerAbstract; | |
class UserTransformer extends TransformerAbstract | |
{ | |
public function transform(array $user) | |
{ | |
return [ | |
'id' => (int) $user['id'], | |
'name' => $user['name'], | |
'email' => $user['email'] | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment