1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00
invoiceninja/app/Ninja/Transformers/UserTransformer.php

18 lines
437 B
PHP
Raw Normal View History

2015-11-01 23:10:20 +01:00
<?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 [
2015-11-05 09:44:48 +01:00
'id' => (int) ($user->public_id + 1),
2015-11-01 23:10:20 +01:00
'first_name' => $user->first_name,
'last_name' => $user->last_name,
'email' => $user->email,
];
}
}