mirror of
https://github.com/anonaddy/anonaddy
synced 2026-04-25 17:15:29 +02:00
30 lines
1.0 KiB
PHP
30 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class RecipientResource extends JsonResource
|
|
{
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'user_id' => $this->user_id,
|
|
'email' => $this->email,
|
|
'can_reply_send' => $this->can_reply_send,
|
|
'should_encrypt' => $this->should_encrypt,
|
|
'inline_encryption' => $this->inline_encryption,
|
|
'protected_headers' => $this->protected_headers,
|
|
'remove_pgp_keys' => $this->remove_pgp_keys,
|
|
'remove_pgp_signatures' => $this->remove_pgp_signatures,
|
|
'fingerprint' => $this->fingerprint,
|
|
'email_verified_at' => $this->email_verified_at?->toDateTimeString(),
|
|
'aliases' => [],
|
|
'aliases_count' => $this->whenCounted('aliases_count'),
|
|
'created_at' => $this->created_at->toDateTimeString(),
|
|
'updated_at' => $this->updated_at->toDateTimeString(),
|
|
];
|
|
}
|
|
}
|