/** * Render the table and pass the output back. * This is done this way because the table * helper dumps everything to the output and * there is no way to catch so have to override * with a special output. * * @return string */ public function __toString() { $this->table->render($this->output); return rtrim($this->output->written()); // Remove trailing \n }