We need to introduce a new "Account Settings" page, accessible from the top-left dropdown menu, where the user's name is currently displayed along with "My Posts" and "Sign Out."
Page Details
The page will have a simple UI with two tabs:
Profile Tab:
Inputs: First Name, Last Name (both required)
Allows users to update their profile information
Password Tab:
Inputs: Current Password, New Password, Confirm Password
Allows users to change their password
UI Requirements
Use Materialize CSS (no custom CSS)
Backend Implementation
Create a new AccountController.php with the following methods:
form() – Displays the account settings page
update() – Updates the user’s profile (first name, last name)
updatePassword() – Updates the user’s password
Implement new middlewares for validation:
Account.php – Ensures first name and last name are required
Password.php – Checks if the current password is correct and validates password confirmation
Additional Requirements
Display a success message after successful updates
Show appropriate validation error messages on failure
We need to introduce a new "Account Settings" page, accessible from the top-left dropdown menu, where the user's name is currently displayed along with "My Posts" and "Sign Out."
Page Details
The page will have a simple UI with two tabs:
Profile Tab:
Inputs: First Name, Last Name (both required)
Allows users to update their profile information
Password Tab:
Inputs: Current Password, New Password, Confirm Password
Allows users to change their password
UI Requirements
Use Materialize CSS (no custom CSS)
Backend Implementation
Create a new
AccountController.phpwith the following methods:form()– Displays the account settings pageupdate()– Updates the user’s profile (first name, last name)updatePassword()– Updates the user’s passwordImplement new middlewares for validation:
Account.php– Ensures first name and last name are requiredPassword.php– Checks if the current password is correct and validates password confirmationAdditional Requirements
Display a success message after successful updates
Show appropriate validation error messages on failure