input('locale'); if (!in_array($locale, ['en', 'pt'])) { abort(400); } session(['locale' => $locale]); return redirect()->back(); } }