PHP code example of omerkoseoglu / devextreme-data-symfony
1. Go to this page and download the library: Download omerkoseoglu/devextreme-data-symfony 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/ */
omerkoseoglu / devextreme-data-symfony example snippets
use DevExtreme\Data\Symfony\DevExtremeLoader;
use DevExtreme\Data\Symfony\Doctrine\EntitySource;
#[Route('/api/orders')]
public function orders(DevExtremeLoader $loader, EntityManagerInterface $em): JsonResponse
{
return $loader->response(EntitySource::for($em, Order::class, where: 'deleted_at IS NULL'));
}
public function load(LoadOptions $options): JsonResponse { /* $options->take, ->filter, ... */ }
yaml
devextreme_data:
normalize_dates: true # compare ISO-8601 filter dates as wall-clock time in SQL
max_take: ~ # cap rows per request (null = unlimited; leave null for PivotGrid endpoints)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.