Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lionix-team/seo-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
karakhanyans committed Apr 24, 2020
2 parents 7d5962a + 37845f2 commit 718035c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Controllers/ManagerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
// use Illuminate\Support\Facades\Input; // Outdated in Laravel 6
use Illuminate\Support\Facades\Schema;
use Lionix\SeoManager\Models\SeoManager as SeoManagerModel;
use Lionix\SeoManager\Models\Translate;
Expand All @@ -16,13 +16,14 @@ class ManagerController extends Controller

protected $locale;

public function __construct()
public function __construct(Request $request)
{
if(Input::get('locale')){
app()->setLocale(Input::get('locale'));
if($request->locale){
app()->setLocale($request->locale);
$this->locale = app()->getLocale();
}
}
}

/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
Expand Down

0 comments on commit 718035c

Please sign in to comment.