Closed curtisdelicata closed 5 months ago
Here are the code search results. I'm now analyzing these search results to write the PR.
app/Filament/Pages/EditProfile.php
Remove the unused `$name` and `$email` properties from the `EditProfile` class.
--- +++ @@ -1,11 +1,8 @@ public User $user; - -public $name = ''; -public $email = ''; public function mount() { - $this->user = Filament::auth()->user(); + $this->user = Auth::user(); $this->form->fill([ 'name' => $this->user->name, 'email' => $this->user->email,
Update the `submit()` method to use the form state to retrieve the updated user information.
--- +++ @@ -2,9 +2,11 @@ { $this->validate(); + $state = $this->form->getState(); + $this->user->forceFill([ - 'name' => $this->name, - 'email' => $this->email, + 'name' => $state['name'], + 'email' => $state['email'], ])->save(); Filament::notify('success', 'Your profile has been updated.');
Remove the unused `Hash` import statement.
--- +++ @@ -2,4 +2,4 @@ use Filament\Facades\Filament; use Filament\Forms\Components\TextInput; use Filament\Pages\Page; -use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Facades\Auth;
Your changes have been successfully made to the branch sweep/refactor_and_fix_syntax_errors_on_appfil. I have validated these changes using a syntax checker and a linter.
sweep/refactor_and_fix_syntax_errors_on_appfil
[!TIP] To recreate the pull request, edit the issue title or description.
This is an automated message generated by Sweep AI.
🚀 Here's the PR! #704
Actions
Step 1: 🔎 Searching
Here are the code search results. I'm now analyzing these search results to write the PR.
Relevant files (click to expand). Mentioned files will always appear here.
https://github.com/liberu-genealogy/genealogy-laravel/blob/ae71ccf6b872b45659325cffb338fcd365a5e56d/app/Filament/Pages/EditProfile.php#L1-L60 https://github.com/liberu-genealogy/genealogy-laravel/blob/ae71ccf6b872b45659325cffb338fcd365a5e56d/app/Filament/Pages/UpdateProfileInformationPage.php#L1-L69 https://github.com/liberu-genealogy/genealogy-laravel/blob/ae71ccf6b872b45659325cffb338fcd365a5e56d/app/Filament/Pages/UpdateProfileInformationPage.php#L1-L69 https://github.com/liberu-genealogy/genealogy-laravel/blob/ae71ccf6b872b45659325cffb338fcd365a5e56d/app/Http/Livewire/EditProfile.php#L1-L43Step 2: ⌨️ Coding
app/Filament/Pages/EditProfile.php
app/Filament/Pages/EditProfile.php
app/Filament/Pages/EditProfile.php
Step 3: 🔄️ Validating
Your changes have been successfully made to the branch
sweep/refactor_and_fix_syntax_errors_on_appfil
. I have validated these changes using a syntax checker and a linter.This is an automated message generated by Sweep AI.