Added timezone for user; Moved dashboard to controller

This commit is contained in:
Constantin Graf
2024-03-19 17:19:54 +01:00
parent 2133eb0c16
commit 6ecfef6bf1
16 changed files with 494 additions and 308 deletions

View File

@@ -23,6 +23,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)],
'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'],
'timezone' => ['required', 'timezone:all'],
])->validateWithBag('updateProfileInformation');
if (isset($input['photo'])) {
@@ -36,6 +37,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
$user->forceFill([
'name' => $input['name'],
'email' => $input['email'],
'timezone' => $input['timezone'],
])->save();
}
}