feat: implement profile update functionality with validation and password handling

This commit is contained in:
2026-07-08 12:10:23 -03:00
parent b273b2866f
commit 73bf285bad
5 changed files with 91 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Domains\Auth\Controllers;
use App\Domains\Auth\Requests\UpdateProfileRequest;
use App\Domains\Auth\Resources\UserResource;
use App\Domains\Auth\Services\ProfileService;
use Illuminate\Http\JsonResponse;
class UpdateProfileController
{
public function __invoke(UpdateProfileRequest $request, ProfileService $service): JsonResponse
{
$user = $service->update($request->user(), $request->validated());
return response()->json(UserResource::make($user)->resolve());
}
}