1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/Ninja/Transformers/UserTransformer.php
2015-11-05 10:44:48 +02:00

18 lines
437 B
PHP

<?php namespace App\Ninja\Transformers;
use App\Models\User;
use League\Fractal;
use League\Fractal\TransformerAbstract;
class UserTransformer extends TransformerAbstract
{
public function transform(User $user)
{
return [
'id' => (int) ($user->public_id + 1),
'first_name' => $user->first_name,
'last_name' => $user->last_name,
'email' => $user->email,
];
}
}