TaskA/app/Http/Controllers/LangController.php

22 lines
337 B
PHP
Raw Permalink Normal View History

2024-06-18 09:43:01 +00:00
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\App;
class LangController extends Controller
{
public function change(Request $request)
{
App::setlocale($request->lang);
session()->put('locale', $request->lang);
return redirect()->back();
}
}