Update codebase to L5.4 (#367)
This commit is contained in:
parent
0a95d97d7f
commit
9c303456fb
25 changed files with 593 additions and 583 deletions
|
@ -44,7 +44,7 @@ class LanguageMiddleware
|
|||
if (Session::has('applocale')) {
|
||||
App::setLocale(Session::get('applocale'));
|
||||
} elseif (Auth::check() && isset(Auth::user()->language)) {
|
||||
Session::set('applocale', Auth::user()->language);
|
||||
Session::put('applocale', Auth::user()->language);
|
||||
App::setLocale(Auth::user()->language);
|
||||
} else {
|
||||
App::setLocale(Settings::get('default_language', 'en'));
|
||||
|
|
|
@ -18,7 +18,7 @@ class RedirectIfAuthenticated
|
|||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect('/');
|
||||
return redirect(route('index'));
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
|
18
app/Http/Middleware/TrimStrings.php
Normal file
18
app/Http/Middleware/TrimStrings.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as BaseTrimmer;
|
||||
|
||||
class TrimStrings extends BaseTrimmer
|
||||
{
|
||||
/**
|
||||
* The names of the attributes that should not be trimmed.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
Reference in a new issue