accepts($type ?: 'application/json')) { throw new NotAcceptableHttpException(); } return $next($request); } }