{"id":20207076,"url":"https://github.com/koolreport/symfony-example","last_synced_at":"2025-08-03T19:08:35.630Z","repository":{"id":44203845,"uuid":"242309878","full_name":"koolreport/symfony-example","owner":"koolreport","description":"How to integrate KoolReport into Symfony framework","archived":false,"fork":false,"pushed_at":"2022-09-30T19:33:50.000Z","size":180,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T03:45:24.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.koolreport.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koolreport.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-22T08:54:19.000Z","updated_at":"2022-03-24T22:28:43.000Z","dependencies_parsed_at":"2023-01-18T15:39:23.402Z","dependency_job_id":null,"html_url":"https://github.com/koolreport/symfony-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/koolreport/symfony-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koolreport%2Fsymfony-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koolreport%2Fsymfony-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koolreport%2Fsymfony-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koolreport%2Fsymfony-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koolreport","download_url":"https://codeload.github.com/koolreport/symfony-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koolreport%2Fsymfony-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268597569,"owners_count":24276032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T05:27:22.566Z","updated_at":"2025-08-03T19:08:35.531Z","avatar_url":"https://github.com/koolreport.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to integrate KoolReport into Symfony?\n\nKoolReport is an open-source PHP Reporting Framework for faster and easier report delivery. KoolReport works well with any MVC frameworks and Symfony is one of them. In this repository, we would like to guide you to integrate KoolReport into Symfony.\n\n# Guide\n\n## Install KoolReport\n\nAdding `koolreport/core` into your `composer.json`\n\n```\n{\n    \"requires\"=\u003e{\n        ...\n        \"koolreport/core\":\"*\"\n    }\n}\n```\n\nand run\n\n```\ncomposer update\n```\n\nNow KoolReport is available in your Symfony application.\n\n## Create your report\n\n1. Under `src` folder, you create folder `Reports` to hold reports\n2. Inside `Reports` folder, you create `MyReport.php` and `MyReport.view.php`, please view our code in above repository.\n3. Make the `MyReport` class under namespace `App\\Reports`\n\n## Render report\n\nNow in your controller's action, you can render report like this:\n\n```\n    /**\n    * @Route(\"/site/report\")\n    */\n    public function report()\n    {\n        $report =  new \\App\\Reports\\MyReport;\n        return new Response($report-\u003erun()-\u003erender());\n    }\n```\n\nor if you want to render report inside twig template you can do:\n\n```\n    /**\n    * @Route(\"/site/reportwithtemplate\")\n    */\n    public function template()\n    {\n        $report =  new \\App\\Reports\\MyReport;\n        return $this-\u003erender('report.html.twig', [\n            'myreport' =\u003e$report-\u003erun()-\u003erender(true)\n        ]);\n    }\n```\n\nand here is the content of your twig template:\n\n\n```\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eRender KoolReport inside Twig Template\u003c/title\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003ch1\u003eRender KoolReport inside Twig Template\u003c/h1\u003e\n        {{myreport|raw}}\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\nNow if you run\n\n```\nhttp://localhost:8000/site/report\n```\n\nor \n\n```\nhttp://localhost:8000/site/reportwithtemplate\n```\n\nyou will see your report!\n\n# Summary\n\nIn this tutorial, we have shown how to use KoolReport inside Symfony web application. You can render report directly or use wit twig template. Hope that this tutorial helps you to get started faster with KoolReport.\n\n__Happy reporting!__","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoolreport%2Fsymfony-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoolreport%2Fsymfony-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoolreport%2Fsymfony-example/lists"}