Modify routes to move 'change password' div


Apr 29th, 2023 12:18 AM

In an effort to clean up my settings area, I moved the 'change password' area to the profile page, not realizing that this would also require changing routes to allow the password change function to work properly on the settings/profile page.


Now that I kind of understand how routes work, I see why this doesn't work, but I tried a few things to modify the routes for this to work and the best I could do was getting it to submit the new password and not really give any kind of success message or error, but the password would never update. Would this be a simple change to make to the routes to allow for this password update to work properly on the settings/profile page?


Thank you!


Apr 29th, 2023 08:35 AM

Best Answer

Hi there Alex,

What you could do is keep things as they are, just change the route for the update password form to settings/security, this will correspond to the following put route:

Route::put('settings/security', '\Wave\Http\Controllers\SettingsController@securityPut')->name('');

That way you can still have the two forms on the same page, but the password form will be using the /settings/security PUT route whenever submitted.

Let me know how it goes!




Apr 29th, 2023 02:46 PM

Please forgive my ignorance, I have looked everywhere trying to figure out what you mean. I am still learning about routes so this bit is confusing to me.

Basically I took the entire block of code from the security page and moved it to the profile page and pasted it in, so I guess I'm confused why would now be using a different route, if it's the same 'form' just made visible on a different page. I might have been searching for the wrong thing but I cannot even find where the route for the form is being indicated. I thought I had a better understanding of this but apparently not.

Thank you very much