From 82a8bcb7a277a728f29e58a20adff25f37e9a40e Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Tue, 2 Oct 2018 23:49:16 -0300 Subject: [PATCH] Refactoring: just including "use App" to make code a bit cleaner I was using "\App::setLocale" on code, but it was annoind me. So I included the "use App" and now I am colling directly the "App::setLocale". --- app/Http/Middleware/Locale.php | 3 ++- app/Mail/UserWaiting.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/Locale.php b/app/Http/Middleware/Locale.php index b60c229..8e0c224 100644 --- a/app/Http/Middleware/Locale.php +++ b/app/Http/Middleware/Locale.php @@ -2,6 +2,7 @@ namespace App\Http\Middleware; +use App; use Closure; class Locale @@ -15,7 +16,7 @@ class Locale */ public function handle($request, Closure $next) { - \App::setLocale(session('lang')); + App::setLocale(session('lang')); return $next($request); } } diff --git a/app/Mail/UserWaiting.php b/app/Mail/UserWaiting.php index c8f8f87..a748fee 100644 --- a/app/Mail/UserWaiting.php +++ b/app/Mail/UserWaiting.php @@ -2,6 +2,7 @@ namespace App\Mail; +use Lang; use \App\Item; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; @@ -35,7 +36,7 @@ class UserWaiting extends Mailable public function build() { return $this->subject( - \Lang::getFromJson( + Lang::getFromJson( ':waitinguser wants to use :itemname', [ 'waitinguser' => $this->waitingUser,