Yii 2.0: yii2-querybuilder

Extension for Yii2 Framework to work with jQuery QueryBuilder
5 followers

This is the jQuery QueryBuilder extension for Yii 2. It encapsulates QueryBuilder component in terms of Yii widgets, and thus makes using QueryBuilder component in Yii applications extremely easy

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist leandrogehlen/yii2-querybuilder "*"

or add

"leandrogehlen/yii2-querybuilder": "*"

to the require section of your composer.json file.

Usage

<?php use leandrogehlen\querybuilder\QueryBuilder; ?>
 
<?= QueryBuilder::widget([        
    'filters' => [
        [
            'id' => 'name',
            'label' => 'Name',
            'type' => 'string',
        ], [
            'id' => 'category',
            'label' => 'Category',
            'type' => 'integer',
            'input' => 'select',
            'values' => [
                 1 => 'Books',
                 2 => 'Movies',
             ]
         ]        
    ]
]) ?>

Resources

Be the first person to leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet