语言切换

This commit is contained in:
TL 2022-08-02 19:00:38 +08:00
parent 3ee8b90e78
commit 7524e69868
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class LanguageController extends Controller
{
public function index($lang)
{
if (array_key_exists($lang, languages())) {
if (in_array($lang, languages()->toArray())) {
Session::put('locale', $lang);
}
return Redirect::back();