mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
18 lines
455 B
PHP
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,
|
||
|
];
|
||
|
}
|
||
|
}
|