Render
Response helpers for common output types.
Methods
void json(mixed $data, int $statusCode = 200)
void csv(array $rows, string $filename, int $statusCode = 200)
void view(string $view, array $data = []) // placeholder
JSON
Render::json(['status' => 'ok']);
CSV
$rows = [['id','name'], [1,'Alice']];
Render::csv($rows, 'users.csv');
Last updated