Skip to content

Commit

Permalink
Fix user locale update in LocalizationController
Browse files Browse the repository at this point in the history
Corrected an error where the static method was being called on an instance. Switched from $User::update to $User->update to correctly update the user's locale in the LocalizationController. This ensures the user's locale is updated properly when authenticated.
  • Loading branch information
Elshaden committed Dec 16, 2023
1 parent d5396aa commit bc35af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/LocalizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function changeLanguage(Request $request)
{
$User = $request->user();

$User::update( ['locale' => $request->language]);
$User->update( ['locale' => $request->language]);

return redirect()->to(config('app.url').config('nova.path'));

Expand Down

0 comments on commit bc35af2

Please sign in to comment.