mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
33 lines
792 B
PHP
33 lines
792 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Resources\V1\Invitation;
|
|
|
|
use App\Http\Resources\V1\BaseResource;
|
|
use App\Models\OrganizationInvitation;
|
|
use Illuminate\Http\Request;
|
|
|
|
/**
|
|
* @property OrganizationInvitation $resource
|
|
*/
|
|
class InvitationResource extends BaseResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @return array<string, string|bool|int|null|array<string>>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
/** @var string $id ID of the invitation */
|
|
'id' => $this->resource->id,
|
|
/** @var string $email Email */
|
|
'email' => $this->resource->email,
|
|
/** @var string $role Role */
|
|
'role' => $this->resource->role,
|
|
];
|
|
}
|
|
}
|