tethys/app/Http/Controllers/Frontend/LocalizationController.php
Arno Kaimbacher 1b2e77d907 - Convert class references from strings to static ::class constants built-in to PHP for improved code completion and static analysis.
- Replace Facade references using the global namespace with their FQCN for improved code completion and static analysis.
- delete database\factories\PageFactory.php and app\services\Registrar.php
2022-08-05 13:26:42 +02:00

43 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Http\Controllers\Frontend;
// use Illuminate\Http\Request;
// use Illuminate\Support\Facades\Input;
// use Illuminate\Support\Facades\Session;
// use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Redirect;
use App\Http\Controllers\Controller;
class LocalizationController extends Controller
{
// public function index(Request $request,$locale){
// //sets applications locale
// app()->setLocale($locale);
// //Gets the translated message and displays it
// echo trans('lang.msg');
// }
public function index()
{
return view('localization.index');
}
public function setLocale($lang)
{
//if action is post method:
//$lang = Input::get('language');
// //Session::put('locale', $lang);
// Session::put(['locale' => $lang]);
//return redirect(url(URL::previous()));
return Redirect::back();
// echo trans('document.msg');
}
}