AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Actions\Fortify;
  3. use App\Concerns\PasswordValidationRules;
  4. use App\Concerns\ProfileValidationRules;
  5. use App\Models\User;
  6. use Illuminate\Support\Facades\Validator;
  7. use Laravel\Fortify\Contracts\CreatesNewUsers;
  8. class CreateNewUser implements CreatesNewUsers
  9. {
  10. use PasswordValidationRules, ProfileValidationRules;
  11. /**
  12. * Validate and create a newly registered user.
  13. *
  14. * @param array<string, string> $input
  15. */
  16. public function create(array $input): User
  17. {
  18. Validator::make($input, [
  19. ...$this->profileRules(),
  20. 'password' => $this->passwordRules(),
  21. ])->validate();
  22. return User::create([
  23. 'name' => $input['name'],
  24. 'email' => $input['email'],
  25. 'password' => $input['password'],
  26. ]);
  27. }
  28. }