yii2-querybuilder Extension for Yii2 Framework to work with jQuery QueryBuilder

  1. Installation
  2. Usage
  3. Resources

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

2 0
6 followers
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Developed by: leandrogehlen
Created on: Jan 14, 2015
Last updated: 9 years ago

Related Extensions