zgabievi / kendo-grid-state
Helper package to handle kendo grid state in Laravel
Requires
- php: ^7.1
- illuminate/database: ^5.6
- illuminate/http: ^5.6
- illuminate/support: ^5.6
Requires (Dev)
- illuminate/routing: ^5.6
- orchestra/testbench: ~3.6.0
- phpunit/phpunit: ~7.0
This package is auto-updated.
Last update: 2024-10-29 04:14:50 UTC
README
Do you love to use Kendo Grid on your website? Have you ever tried to manage it's state to return correct data? With the help of this package, it will only take you several seconds now. You just need to install our helper, and tell us on which model should it work... Done!
Installation
Install via composer
composer require zgabievi/kendo-grid-state
Usage
To use this package you only need to add Filterable
trait to your model
Example:
namespace App; use Illuminate\Database\Eloquent\Model; use Zgabievi\KendoGridState\Traits\Filterable; class Post extends Model { use Filterable; // }
URL Examples:
https://domain.com/api/posts?take=5
https://domain.com/api/posts?skip=5&take=2
https://domain.com/api/posts?sort[0][field]=title&sort[0][dir]=desc
https://domain.com/api/posts?filter[logic]=and&filter[filters][0][field]=title&filter[filters][0][operator]=eq&filter[filters][0][value]=POST_TITLE
Query Parameters:
- filter?
- filters[]
- field? (string | Function)
- ignoreCase? (boolean)
- operator ("eq", "neq", "isnull", "isnotnull", "lt", "lte", "gt", "gte", "startswith", "endswith", "contains", "doesnotcontain", "isempty", "isnotempty")
- value? (any)
- logic ("or", "and")
- filters[]
- group?[]
- aggregates?[]
- aggregate ("count", "sum", "average", "min", "max")
- field (string)
- dir? ("asc", "desc")
- field (string)
- aggregates?[]
- skip? (number)
- sort?
- dir? ("asc", "desc")
- field (string)
- take? (number)
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email zura.gabievi@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License file for more information.