1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Ninja/Transformers/ContactTransformer.php

18 lines
455 B
PHP
Raw Normal View History

2015-11-03 15:21:17 +01:00
<?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,
];
}
}