public function respond(array $data, $status = 200, $code, array $headers = [], $options = 0)
    {
        return $this->response->json(
            array_merge(compact('status', 'code'), $data), $status, $headers, $options
        );
    }
public function respond(array $data, $status = 200, $code, array $headers = [], $options = 0)
    {
        return $this->response->json(
            array_merge(compact('status', 'code'), $data), $status, $headers, $options
        );
    }
public function respond ( array $ data , $ status = 200 , $ code , array $ headers = [ ] , $ options = 0 ) { return $ this -> response -> json ( array_merge ( compact ( 'status' , 'code' ) , $ data ) , $ status , $ headers , $ options ) ; }
Respond with a json response.

@param  array   $data
@param  int     $status
@param  string  $code
@param  array   $headers
@param  int     $options

@return \Illuminate\Http\JsonResponse
Respond with a json response .