Move ApplicationSession::class earlier, we are dependant on config('server') existing when loading user details
This commit is contained in:
parent
c1ba6df90d
commit
acc6598da1
@ -35,13 +35,13 @@ class Kernel extends HttpKernel
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
ApplicationSession::class,
|
||||
SwapinAuthUser::class,
|
||||
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
|
||||
ApplicationSession::class,
|
||||
CheckUpdate::class,
|
||||
],
|
||||
|
||||
|
@ -20,10 +20,10 @@ class ApplicationSession
|
||||
*/
|
||||
public function handle($request,Closure $next)
|
||||
{
|
||||
view()->share('user', auth()->user() ?: new User);
|
||||
|
||||
\Config::set('server',new Server);
|
||||
|
||||
view()->share('user', auth()->user() ?: new User);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user