['required', 'in:'.implode(',', Arr::pluck(config('app.available_locales'), 'locale'))], 'display_currency' => ['required', 'exists:currencies,currency'], ]; } public function mount() { $this->currencies = Currency::get(); $this->display_currency = auth()->user()->getCurrency(); $this->locale = auth()->user()->getLocale(); $this->user = auth()->user(); } public function updateProfileInformation() { $this->resetErrorBag(); $this->validate(); $this->user->setOption([ 'locale' => $this->locale, 'display_currency' => $this->display_currency, ]); $this->user->save(); cache()->tags(['metrics-'.$this->user->id])->flush(); $this->dispatch('saved'); // $this->js('window.location.reload();'); } }; ?> {{ __('Locale Options') }} {{ __('Adjust localization options for your preferred region.') }}
{{ __('Saved.') }} {{ __('Save') }}