diff --git a/src/Http/Middleware/ForbidBannedUser.php b/src/Http/Middleware/ForbidBannedUser.php index 612f953..5a20414 100644 --- a/src/Http/Middleware/ForbidBannedUser.php +++ b/src/Http/Middleware/ForbidBannedUser.php @@ -47,9 +47,7 @@ public function handle($request, Closure $next) $user = $this->auth->user(); if ($user && $user instanceof BannableContract && $user->isBanned()) { - return redirect()->back()->withInput()->withErrors([ - 'login' => 'This account is blocked.', - ]); + return abort(403, 'This account is blocked.'); } return $next($request);