public function suspend($id)
{
try {
// Find the user using the user id
$throttle = $this->sentry->findThrottlerByUserId($id);
// Suspend the user
$throttle->suspend();
// Fire the 'user suspended' event
$this->dispatcher->fire('sentinel.user.suspended', ['userId' => $id]);
return new SuccessResponse(trans('Sentinel::users.suspended'), ['userId' => $id]);
} catch (UserNotFoundException $e) {
$message = trans('Sentinel::sessions.invalid');
return new ExceptionResponse($message);
}
}