Files
Twyco e9fc8cabb5
CI/CD / test_and_check_app (push) Failing after 58s
CI/CD / Publish immutable image (push) Skipped
Fix team authorization, invite revocation, and slug handling
2026-09-19 05:54:18 +02:00

28 lines
552 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->hasEnabledTwoFactorAuthentication(),
];
}
}