Add profile avatar uploads
linter / quality (pull_request) Successful in 1m28s
tests / ci (8.4) (pull_request) Successful in 1m53s

This commit is contained in:
2026-06-24 13:55:27 +02:00
parent 732f49ee80
commit 598f8631f9
18 changed files with 547 additions and 24 deletions
+8 -1
View File
@@ -2,6 +2,7 @@
namespace App\Actions\Fortify;
use App\Actions\Users\UpdateUserAvatar;
use App\Concerns\PasswordValidationRules;
use App\Concerns\ProfileValidationRules;
use App\Models\User;
@@ -12,6 +13,10 @@ class CreateNewUser implements CreatesNewUsers
{
use PasswordValidationRules, ProfileValidationRules;
public function __construct(
private readonly UpdateUserAvatar $avatars,
) {}
/**
* Validate and create a newly registered user.
*
@@ -24,10 +29,12 @@ class CreateNewUser implements CreatesNewUsers
'password' => $this->passwordRules(),
])->validate();
return User::create([
$user = User::create([
'name' => $input['name'],
'email' => $input['email'],
'password' => $input['password'],
]);
return $this->avatars->generate($user);
}
}