Update codebase to L5.4 (#367)

This commit is contained in:
Dane Everitt 2017-04-01 17:59:43 -04:00 committed by GitHub
parent 0a95d97d7f
commit 9c303456fb
25 changed files with 593 additions and 583 deletions

View file

@ -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'));

View file

@ -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);

View 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',
];
}