mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 13:32:41 +08:00
31 lines
849 B
PHP
31 lines
849 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Resources;
|
||
|
|
|
||
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||
|
|
|
||
|
|
class InviteResource extends JsonResource
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Transform the resource into an array.
|
||
|
|
*
|
||
|
|
* @param \Illuminate\Http\Request $request
|
||
|
|
* @return array
|
||
|
|
*/
|
||
|
|
public function toArray($request)
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'id' => $this->id,
|
||
|
|
'inviter' => $this->inviter,
|
||
|
|
'invitee' => $this->inviter,
|
||
|
|
'hash' => $this->hash,
|
||
|
|
'time_invited' => $this->time_invited,
|
||
|
|
'valid' => $this->valid,
|
||
|
|
'valid_text' => $this->valid_text,
|
||
|
|
'invitee_register_uid' => $this->invitee_register_uid,
|
||
|
|
'invitee_register_email' => $this->invitee_register_email,
|
||
|
|
'invitee_register_username' => $this->invitee_register_username,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|