File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88use Illuminate \Contracts \Auth \MustVerifyEmail ;
99use Illuminate \Support \Facades \Auth ;
1010use Illuminate \Support \Facades \Session ;
11+ use Illuminate \Support \Str ;
1112use Illuminate \Validation \ValidationException ;
1213use Livewire \Attributes \Computed ;
1314use Livewire \Component ;
@@ -100,6 +101,8 @@ public function resendVerificationNotification(): void
100101
101102 public function updateProfileInformation (): void
102103 {
104+ $ this ->name = Str::trim ($ this ->name );
105+
103106 $ this ->username = preg_replace ('/[\s+]/ ' , '_ ' , strtolower ($ this ->username ));
104107
105108 $ validated = $ this ->validate ($ this ->profileRules ($ this ->user ->id ), $ this ->profileRulesErrorMessage ());
Original file line number Diff line number Diff line change 99use Illuminate \Contracts \Auth \MustVerifyEmail ;
1010use Illuminate \Support \Facades \Auth ;
1111use Illuminate \Support \Facades \Session ;
12+ use Illuminate \Support \Str ;
1213use Laravel \Fortify \Actions \DisableTwoFactorAuthentication ;
1314use Laravel \Fortify \Features ;
1415use Livewire \Attributes \Computed ;
@@ -98,6 +99,8 @@ public function hasUnverifiedEmail(): bool
9899
99100 public function updateProfileInformation (): void
100101 {
102+ $ this ->name = Str::trim ($ this ->name );
103+
101104 $ this ->username = preg_replace ('/[\s+]/ ' , '_ ' , strtolower ($ this ->username ));
102105
103106 $ validated = $ this ->validate ($ this ->profileRules ($ this ->user ->id ), $ this ->profileRulesErrorMessage ());
You can’t perform that action at this time.
0 commit comments