public static function addAcceptableJsonTypeForRequest(Closure $determination = null, Closure $callback = null)
    {
        app()->rebinding('request', function ($app, Request $request) use ($determination, $callback) {
            if (is_null($determination) || $determination($request)) {
                $accept = $request->headers->get('Accept');

                if (! Str::contains($accept, ['/json', '+json'])) {
                    $accept = rtrim('application/json,'.$accept, ',');

                    $request->headers->set('Accept', $accept);
                    $request->server->set('HTTP_ACCEPT', $accept);
                    $_SERVER['HTTP_ACCEPT'] = $accept;

                    if ($callback) {
                        $callback($request);
                    }
                }
            }
        });
    }