PHP code example of m2mtech / api-platform-datatables-format
1. Go to this page and download the library: Download m2mtech/api-platform-datatables-format 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/ */
m2mtech / api-platform-datatables-format example snippets
// config/bundles.php
return [
// ...
M2MTech\ApiPlatformDatatablesFormat\M2MTechApiPlatformDatatablesFormatBundle::class => ['all' => true],
];
#[ApiFilter(OrderFilter::class, properties: ['name', 'price'])]
#[ApiFilter(SearchFilter::class, properties: ['name' => 'partial', 'description' => 'partial'])]
#[ApiFilter(FilterLogic::class)]
diff
- /api/offers?draw=1&start=0&length=10
+ /api/offers?draw=1&page=1&itemsPerPage=10