Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Latest commit

 

History

History
24 lines (18 loc) · 508 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 508 Bytes

doctrine-datatable

jQuery Datatables For Symfony Doctrine

Usage with doctrine/dbal:

<?php

use Doctrine\DataTables;

$connection = /** instanceof Doctrine\DBAL\Connection */;

$datatables = DataTableBuilder::factory()
    ->withIndexColumn('id')
    ->withQueryBuilder(
        $connection->createQueryBuilder()
            ->select('*')
            ->from('users')
    )
    ->withRequestParams($_GET);

echo json_encode($datatables->getResponse());