1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00
invoiceninja/app/Ninja/Transformers/ContactTransformer.php
2015-11-03 16:21:17 +02:00

18 lines
455 B
PHP

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