src/Support/Http/Middleware/AcceptJson.php
public function handle(Request $request, Closure $next)
    {
        $request->headers->set('Accept', 'application/json');

        return $next($request);
    }
public function handle(Request $request, Closure $next)
    {
        $request->headers->set('Accept', 'application/json');

        return $next($request);
    }
public function handle ( Request $ request , Closure $ next ) { $ request -> headers -> set ( 'Accept' , 'application/json' ) ; return $ next ( $ request ) ; }
Force the Accept header of the request.

@param  \Illuminate\Http\Request  $request
@param  \Closure  $next
@return \Illuminate\Http\JsonResponse
Force the Accept header of the request .