langswitch
This commit is contained in:
parent
ad42e73126
commit
8d91d0e7a8
14 changed files with 792 additions and 76 deletions
33
app/Http/Middleware/Locale.php
Normal file
33
app/Http/Middleware/Locale.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Session;
|
||||
use App;
|
||||
use Config;
|
||||
|
||||
class Locale
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
// if(!Session::has('locale'))
|
||||
// {
|
||||
// Session::put('locale', Config::get('app.locale'));
|
||||
// }
|
||||
$language = Session::get('locale', Config::get('app.locale'));
|
||||
// $data = Session::all();
|
||||
// $language =Session::get('locale1');
|
||||
|
||||
|
||||
App::setLocale($language);
|
||||
return $next($request);
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue