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".
This commit is contained in:
Bruno F. Fontes 2018-10-02 23:49:16 -03:00
parent 528d3b4caf
commit 8157a183c7
Signed by: brunofontes
GPG Key ID: EE3447CE80048495
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,7 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use App;
use Closure; use Closure;
class Locale class Locale
@ -15,7 +16,7 @@ class Locale
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
\App::setLocale(session('lang')); App::setLocale(session('lang'));
return $next($request); return $next($request);
} }
} }

View File

@ -2,6 +2,7 @@
namespace App\Mail; namespace App\Mail;
use Lang;
use \App\Item; use \App\Item;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable; use Illuminate\Mail\Mailable;
@ -35,7 +36,7 @@ class UserWaiting extends Mailable
public function build() public function build()
{ {
return $this->subject( return $this->subject(
\Lang::getFromJson( Lang::getFromJson(
':waitinguser wants to use :itemname', ':waitinguser wants to use :itemname',
[ [
'waitinguser' => $this->waitingUser, 'waitinguser' => $this->waitingUser,