1. Go to this page and download the library: Download studiomado/query-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
studiomado / query-bundle example snippets
public function findAllNoPaginated();
public function getTasksExcelReportAction(Request $request)
{
$tasks = $this->getDoctrine()
->getRepository('AppBundle:Task')
->findAllNoPaginated();
$reportExcel = new TasksReport($tasks);
$reportExcel->createReport();
$excelContent = $reportExcel->printReport();
return new Response(
$excelContent,
200, [
'Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
]
);
}
public function getTasksAction(Request $request)
{
return $this->getDoctrine()
->getRepository('AppBundle:Task')
->setRequest($request)
->findAllPaginated();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.