1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00
invoiceninja/app/Ninja/Transformers/InvitationTransformer.php

22 lines
541 B
PHP
Raw Permalink Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Ninja\Transformers;
2016-01-24 19:55:36 +01:00
use App\Models\Invitation;
class InvitationTransformer extends EntityTransformer
{
public function transform(Invitation $invitation)
{
2016-07-19 09:07:56 +02:00
$invitation->setRelation('account', $this->account);
2016-01-24 19:55:36 +01:00
return [
'id' => (int) $invitation->public_id,
'key' => $invitation->getName(),
'link' => $invitation->getLink(),
2018-06-26 13:48:32 +02:00
'sent_date' => $invitation->sent_date ?: '',
'viewed_date' => $invitation->sent_date ?: '',
2016-01-24 19:55:36 +01:00
];
}
2016-07-19 09:07:56 +02:00
}