Files
ots/app/Http/Resources/UserResource.php
T
Twyco 3db250ca51
CI/CD / test_and_check_app (push) Failing after 56s
CI/CD / Publish immutable image (push) Skipped
revoke team member invite
2026-09-19 05:43:00 +02:00

28 lines
581 B
PHP

<?php
namespace App\Http\Resources;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @mixin User
*/
class UserResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'name' => $this->name,
'email' => $this->email,
'has_multi_factor' => $this->hasVerifiedEmail() || $this->hasEnabledTwoFactorAuthentication(),
];
}
}