From 902b5912b813d03718ba7efc03087ec073f379b8 Mon Sep 17 00:00:00 2001 From: Xander Date: Sat, 18 Jan 2020 16:08:49 +0100 Subject: [PATCH] Removed Input dependency Removed the Input dependency that is no longer supported in Laravel 6. --- src/Controllers/ManagerController.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Controllers/ManagerController.php b/src/Controllers/ManagerController.php index 420049e..c950d15 100644 --- a/src/Controllers/ManagerController.php +++ b/src/Controllers/ManagerController.php @@ -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; @@ -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 */