Support the ongoing development of Laravel.io →
posted 7 years ago
Session

I'm not sure that this is the correct way of doing this but I want to make select dropdown where the user can change the currency on the site, respectively this will reload the page and change the prices on products to chosen currency.

I have this drop-down menu

<select>
	<option value="{{ USDRate() }}">USD</option>
	<option value="{{ USDRateEUR() }}">EUR</option>
	<option value="{{ USDRateGBP() }}">GBP</option>
</select>

What I think Is that when user select new currency I must store it in the session, right? How can I achieve this on button click? Default currency is USD

Last updated 2 years ago.
0

Hi vin,

get this selected value from request and store it in session . I hope this helped

Thanks Chandran Nepolean

0

Sign in to participate in this thread!

Eventy

Your banner here too?

vinsbg vinsbg Joined 26 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.