response::json($data, $code = 200)

Converts an array to json and returns it properly

  • $data (array)
  • return (object)