state = array_merge([ 'email' => $user->email, ], $user->withoutRelations()->toArray()); } /** * Update the user's profile information. * * @param \Laravel\Fortify\Contracts\UpdatesUserProfileInformation $updater * @return \Illuminate\Http\RedirectResponse|null */ public function updateProfileInformation(UpdatesUserProfileInformation $updater) { $this->resetErrorBag(); $updater->update( Auth::user(), $this->photo ? array_merge($this->state, ['photo' => $this->photo]) : $this->state ); if (isset($this->photo)) { return redirect()->route('profile.show'); } $this->dispatch('saved'); $this->dispatch('refresh-navigation-menu'); } /** * Delete user's profile photo. * * @return void */ public function deleteProfilePhoto() { Auth::user()->deleteProfilePhoto(); $this->dispatch('refresh-navigation-menu'); } /** * Sent the email verification. * * @return void */ public function sendEmailVerification() { Auth::user()->sendEmailVerificationNotification(); $this->verificationLinkSent = true; } /** * Get the current user of the application. * * @return mixed */ public function getUserProperty() { return Auth::user(); } /** * Render the component. * * @return \Illuminate\View\View */ public function render() { return view('vuexy-admin::livewire.profile.update-profile-information-form'); } }