Download the PHP package elnelsonperez/kendo-grid-parser without Composer
On this page you can find all versions of the php package elnelsonperez/kendo-grid-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elnelsonperez/kendo-grid-parser
More information about elnelsonperez/kendo-grid-parser
Files in elnelsonperez/kendo-grid-parser
Package kendo-grid-parser
Short Description A package to apply Kendo Grid filters to a query builder instance in Laravel.
License MIT
Informations about the package kendo-grid-parser
Laravel Kendo Grid Parser
Takes a Kendo Angular Grid state and applies all its filters to a Laravel query builder instance. Works with any of these query builders out of the box:
\Illuminate\Database\Query\Builder::class
\Illuminate\Database\Query\Builder::class
\Tinderbox\ClickhouseBuilder\Integrations\Laravel\Builder::class
(https://github.com/the-tinderbox/ClickhouseBuilder)
Tested with @progress/kendo-angular-grid v3.X.X
and Laravel 5.6 and up.
Instalation
composer require elnelsonperez/kendo-grid-parser
The package will be auto-discovered by Laravel 5.5+
Usage
Example grid state as JSON
This would be sent from the client and into the controller below.
Example Controller
The returned query builder instance would have all the filters received applied to it, but you can continue using it as you please.
Configuration
You can publish the packages configuration to customize/extend the implementations used by doing
php artisan vendor:publish --provider="ElNelsonPerez\KendoGridParser\KendoGridParserServiceProvider"
Further configuration options could be provided upon request.
Motivation
I pulled this code from another project to reuse between projects as I deal with Kendo Grid and Laravel often enough, and figured it would be useful to someone else.