n1crack / datatables

Simplify your Datatables server-side processing effortlessly using our lightning-fast PHP library, streamlining your workflow seamlessly.
https://datatables.ozdemir.be/
MIT License
267 stars 90 forks source link

update CI 3 example #71

Closed Goddard closed 2 years ago

Goddard commented 3 years ago

I noticed on the CI 3 example you just echo the generate function. This works in CI 3 but it also breaks the loop and doesn't end cleanly.

It is recommended to do it like this.

$this->output
            ->set_status_header(200)
            ->set_content_type('application/json')
            ->set_output($dt->generate());