Download the PHP package thephpguys/spiral-datagrid-bundle without Composer
On this page you can find all versions of the php package thephpguys/spiral-datagrid-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package spiral-datagrid-bundle
SpiralDataGridBundle
This bundle provides integration for spiral/data-grid with your Symfony project. Inspired by spiral/data-grid-bridge
package, it offers the following features:
- Seamless integration of the DataGrid component into a Symfony environment
- Doctrine\ORM\QueryBuilder writer for constructing DQL based on filters.
- DataGrid attribute for controllers
DataGrid Component Documentation
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
Usage
Step 1: Create grid schema
Create a grid schema by defining filters, sorters, and pagination settings. You can find more filters on the DataGrid documentation page :
Step 2: Register schema as service
Register your grid schema as a service in config/services.yaml
:
Step 3: Create controller method
Create a controller method to use the DataGrid:
This setup provides a route with JSON response and query parameters for filters, sorters, and pagination.
Example Usage
- Filters: https://localhost/products?filter[search]=IPhone
- Sorters: https://localhost/products?sort[article]=desc
- Pagination: https://localhost/products?page=2
All versions of spiral-datagrid-bundle with dependencies
symfony/config Version ^7.1
symfony/dependency-injection Version ^7.1
symfony/http-kernel Version ^7.1
spiral/data-grid Version ^3.0
doctrine/orm Version ^3.2