code: public function renderJSON($data, $status = 200)
      {
          exit(Response::Create(json_encode($data))->status($status)->headers(['Content-Type' => 'application/json'])->display());
      }
docs: Display JSON.
  
  @param array $data
  @param int   $status