PHPackages                             easylist/easylist - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. easylist/easylist

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

easylist/easylist
=================

For dynamic listing

1.01(3y ago)135PHP

Since Jul 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dmplugin/easylist)[ Packagist](https://packagist.org/packages/easylist/easylist)[ RSS](/packages/easylist-easylist/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP EasyList - Version 1.0
==========================

[](#php-easylist---version-10)

#### by

[](#by)

PHP Team DigitalMesh
--------------------

[](#php-team-digitalmesh)

### Introduction

[](#introduction)

EasyList is a PHP plugin which lets the developer to implement listing,pagination and filtering with less code and effort. With the help of composer the plugin can be included to the projects which are developed using any frameworks in PHP which makes EasyList versatile.

### Requirements

[](#requirements)

- PHP version supported from 5.6 to 8
- JQuery and Bootstrap
- PDO Extension

### Supporting Databases

[](#supporting-databases)

EasyList supports the following databases

- MySQL
- MSSQL
- ORACLE

### Features

[](#features)

- Page control. This will prepare query and apply filter based on the paramters provided and returns data as Json/Object. This control also provides a feature to get the SQL query for debugging
- Pager control is to navigate to different pages
- Listing control. This will support both Postback and Ajax rendering

### Installation

[](#installation)

EasyList is supported in PHP versions 5.6 to 8.The plugin requires Bootstrap and JQuery preinstalled.

##### Using Composer

[](#using-composer)

If the respective project includes composer EasyList can be added to the project by the following command.

```
composer require easylist/easylist
```

##### Git

[](#git)

EasyList can be downloaded or cloned from

```
https://github.com/dmplugin/easylist.git
```

##### Configuring

[](#configuring)

If the plugin was included to the project through composer. The file

```
vendor/easylist/config/EasyListConfig.php
```

needs to be configured.

Copy this file to any desired location in the project The line number 20 of this file contains the following code

```
20 $configPath = 'app/config/EasyListConfig.php';
```

Change the path mentioned there to the path of the configuration file of the project. For Laravel projects this would be the path of the .env file.

If the plugin is added manually then add the file EasyList.php to the desired code block.

```
require 'vendor/easylist/EasyList.php'
```

### Usage

[](#usage)

There are three function for listing,pagination and rendering filtered result to the DOM.

- Page
- List
- Pager

Page function have to be added in the controller. List and Pager function should be added to the view.

### Page Function

[](#page-function)

This function is called from the controller part.

```
Listing::Page(array());
```

There are some parameters that need to be given in the array. The params are mentioned below

ParamDescriptionselectComma separated column list along with aliasfromFrom table with aliasjoinsJoin statementsconditionsArray which consists of the conditions that has to be applied in the  clause. Its to mention extra conditions other than filtersgroupComma separated group nameshavingArray which consists of the conditions and values for  clausehaving\_columnsComma separated list of columns used in the ***HAVING*** clause.filtersArray which consists of conditions for the filters from the front endorderComma separated order columns with **ASC / DESC** keyreturn\_dataFormat of the data that has to be returned. Options are : ***HTML / JSON / OBJECT / QUERY*** Here Object is userd for Postback listing. Json is used for Ajax listing. Html is used for both Postback and ajax. But developer have to prepare his own table using the data returned by the function. Query is for debugging to see the backend query. If Json is used then developer have to include the css &amp; js located in the asset folder this plugin.viewview location if return\_data is HTML. This is for rendering data through ajax when developer wants custom tablesview\_variablesArray variables that has to be passed to the viewpagepage numberpaginationUsed to mention whether pagination is present or not. Options : ***YES / NO***page\_sizesNumber of records that has to be shown in each pageThese are the options for filter

OptionDescriptionPossible valuesconditionThe condition which has to be included in the ***WHERE*** clause-form-fieldThe field from which the value is taken for the particular condition-operationThis option specifies which operation binds the condition to other consitions***AND/OR***typeThe type of the form-field\***BOOLEAN/ DATE/ DATETIME/ TIME/ INTEGER/ STRING/ ARRAY**datetime\_format\_fromDate time format of th fieldProvide PHP date time formatedatetime\_format\_toThe date time format to which the field value has to be convertedProvide PHP date time formateconsider\_emptyIf the option consider\_empty is YES then the field's condition will be considered for the query created automatically otherwise it will be ruled out. By default this option's value is NO.***YES/NO***typeOption : COMPLEX. This is to include complex query. In this case normal condition array will be added to an array this option. See the example section-`If both conditions and filters options are present filters will have more preference. `

These are the options for condition

OptionDescriptionPossible valuesconditionThe condition which has to be included in the ***WHERE*** clause-valueThe values which has to be added to the respective ***WHERE*** clause-operationThis option specifies which operation binds the condition to other consitions***AND/OR***###### Examples

[](#examples)

**select**

```
Listing::Page(array(
       "select" => "id,name"
));
```

**from**

```
 Listing::Page(array(
       "select" => "id,name",
       "from"   => "user AS usr"
));
```

**joins**

```
 Listing::Page(array(
       "select" => "id,name",
       "from"   => "user AS usr",
       "joins"  => " INNER JOIN login AS lgn  ON usr.id = lgn.user_id"
));
```

**conditions**

```
Listing::Page(array(
      "select"     => "id,name",
      "from"       => "user AS usr",
      "conditions" => array(
          array("condition" => "id > ?","value" => 10, "operation" => "AND"),
          array("condition" => "code  ?","value" => "AU", "operation" => "AND")
      )
));
```

**group**

```
Listing::Page(array(
      "select" => "id,name",
      "from"   => "user AS usr",
      "group"  => "code"
));
```

**having**

```
Listing::Page(array(
      "select" => "id,name",
      "from"   => "customer AS cust",
      "group"  => "code",
      "having" => array(
          array("condition" => "count(*) > ?", "value" => 5, "operation" => "OR")
      )
));
```

**having\_columns**

```
Listing::Page(array(
     "select" => "id,name",
     "from"   => "customer AS cust",
     "group"  => "code",
     "having" => array(
         array("condition" => "age = ?", "value" => 25, "operation" => "AND")
         array("condition" => "count(*) < ?", "value" => 10, "operation" => "AND")
     ),
     "having_columns"        => "age"
));
```

**filters**

```
 Listing::Page(array(
       "select"  => "id,name",
       "from"    => "customer AS cust",
       "filters" => array(
           array("condition" => "cust.name = ?", "form-field" => "txt_name",
                "operation" => "AND", "type"=>"STRING",
                "consider_empty" => "YES"),
           array("condition" => "cust.created_date = ?", "form-field" => "c_date",
           "operation" => "OR", "type"=>"DATE",
           "datetime_format_from"=>"d/m/Y", "datetime_format_to"=>"Y-m-d",
           "consider_empty" => "NO")
       )
));
```

**complex filters**

```
 Listing::Page(array(
       "select"  => "id,name",
       "from"    => "customer AS cust",
       "filters" => array(
           array("condition" => "cust.name = ?", "form-field" => "txt_name",
                "operation" => "AND", "type"=>"STRING",
                "consider_empty" => "YES"),
           array("condition" => "cust.created_date = ?", "form-field" => "c_date",
           "operation" => "OR", "type"=>"DATE",
           "datetime_format_from"=>"d/m/Y", "datetime_format_to"=>"Y-m-d",
           "consider_empty" => "NO"),
           array("type"=>"COMPLEX", "operation" => "AND", "condition" =>array(
              array("condition" => "cust.name = ?",
              "form-field" => "txt_name", "operation" => "AND", "type"=>"STRING",
                  "consider_empty" => "YES"),
              array("condition" => "cust.area = ?", "form-field" => "txt_name",
              "operation" => "AND", "type"=>"STRING",
                  "consider_empty" => "YES"),
           )
       )
));
```

**order**

```
Listing::Page(array(
    "select" => "id,name",
    "from"   => "customer AS cust",
    "order" => "name ASC"
));
```

**return\_data**

```
Listing::Page(array(
    "select" => "id,name",
    "from"   => "customer AS cust",
    "return_data" => "JSON"
));
```

`return_data can have  HTML / JSON / OBJECT / QUERY`

**view**

```
Listing::Page(array(
    "select"      => "id,name",
    "from"        => "customer AS cust",
    "return_data" => "HTML"
    "view"        => "views/list.php"
));
```

**view\_variables**

```
Listing::Page(array(
    "select"         => "id,name",
    "from"           => "customer AS cust",
    "return_data"    => "HTML",
    "view"           => "views/list.php",
    "view_variables" => array("ids"=>$ids,"names"=>$names)
));
```

**page**

```
Listing::Page(array(
    "select"         => "id,name",
    "from"           => "customer AS cust",
    "return_data"    => "HTML",
    "view"           => "views/list.php",
    "view_variables" => array("ids"=>$ids,"names"=>$names),
    "page"           => 1
));
```

**pagination**

```
Listing::Page(array(
    "select"         => "id,name",
    "from"           => "customer AS cust",
    "return_data"    => "JSON",
    "page"           => 1,
    "pagination"     => "YES"
));
```

`Default value for pagination is YES`

**page\_sizes**

```
Listing::Page(array(
    "select"         => "id,name",
    "from"           => "customer AS cust",
    "return_data"    => "JSON",
    "page"           => 1,
    "pagination"     => "YES"
    "page_sizes"      => 25
));
```

### List Function

[](#list-function)

List function is used in the view page. This function directs the control to the URL from where the data should be formatted and shown. It places the resulting list to the desired area of the DOM.

```
Listing::List(array());
```

The list function will help to create a table like shown below. [![List Image](https://camo.githubusercontent.com/a03ebd2fb6da7232ecf557c892a3cdb3e4dba35448d2ca40df3447600ec17841/68747470733a2f2f692e696d6775722e636f6d2f78494e4f62506f2e706e67)](https://camo.githubusercontent.com/a03ebd2fb6da7232ecf557c892a3cdb3e4dba35448d2ca40df3447600ec17841/68747470733a2f2f692e696d6775722e636f6d2f78494e4f62506f2e706e67)There parameters for list function is mentioned below

ParamDescriptionurlTarget location of controller/action functionform\_idId of the filter formtarget\_div\_idDiv id where we want to show the outputbutton\_idID of the filtering buttonautolistCan have true / false : If true will show the output first time without pressing the buttoncolumnSpecify the columns of the listdataProvides data returned by the page function here. This is for post back renderingreturn\_dataThis is to specify the data type of page function. Options are : ***HTML / JSON / OBJECT***pagerLocation where we want to show the page controller. Options : ***TOP/BOTTOM/BOTH***page\_sizesProvideS the array option for pagination. The Default is ***array(10,25,50,100,250)***actionTo point out the action columns where edit,delete and show links should be shown. Here developer can use ***{&lt;Table\_column\_name&gt;}*** to add values in the script/htmlTable with sortable headers is shown in the screenshot below. [![List with sortable header Image](https://camo.githubusercontent.com/5afcae527a72c028ae9823e0de7540931ce809d1338ad006e906310a06bf2e39/68747470733a2f2f692e696d6775722e636f6d2f5755764750725a2e706e67)](https://camo.githubusercontent.com/5afcae527a72c028ae9823e0de7540931ce809d1338ad006e906310a06bf2e39/68747470733a2f2f692e696d6775722e636f6d2f5755764750725a2e706e67)Options of column

OptionDescriptionheadHeader for the particular columncolumnThe param from the JSON response fom which the data has to be takenwidthWidth of the columnsortWhich column should be considered for sortingclassMention the CSS classdate\_formatphp date format. This can be used for formating the date if return\_data is Object.boolean\_formatYesNo or TrueFalsejs\_date\_format\_fromThis is to specify the source date formate for ajax listing.js\_date\_format\_toThis is the date formate for ajax listing. Developer can use yy/mm/dd/h/i/s/A for formating date. Eg. yy-mm-dd h:i:s A###### Examples

[](#examples-1)

**url,form\_id,target\_div\_id,button\_id,column,pager**These 6 params are mandatory fields for List() function.

```
Listing::List(array(
    "url"           => "customer/list",
    "form_id"       => "user_filter_form",
    "target_div_id" => "user_list_div",
    "button_id"     => "user_list",
    "data"	     => $page_data,
    "column"        => array(
                            array("head" => "Code", "column" => "a_code",
                            "width" => '30%',"sort" => "a_code",
                            "class" => "text-center"),
                            array("head" => "Town", "column" => "a_town",
                            "width" => '30%', "class" => "",
                            "sort" => "a_town"),
                            array("head" => "Address", "column" => "a_state",
                            "width" => '40%', "class" => "",
                            "sort" => "address")
                       ),
    "pager"          => "BOTH"
));
```

###### Column params

[](#column-params)

**autolist**

```
Listing::List(array(
    "url"           => "customer/list",
    "form_id"       => "user_filter_form",
    "target_div_id" => "user_list_div",
    "button_id"     => "user_list",
    "autolist"       => true,
    "data"	     => $page_data,
    "column"        => array(
                            array("head" => "Code", "column" => "a_code",
                            "width" => '30%',"sort" => "a_code",
                            "class" => "text-center"),
                            array("head" => "Town", "column" => "a_town",
                            "width" => '30%', "class" => "",
                            "sort" => "a_town"),
                            array("head" => "Address", "column" => "a_state",
                            "width" => '40%', "class" => "",
                            "sort" => "address")
                       ),
    "pager"          => "BOTH"
));
```

`'autolist' can either have  true/false`

**action**

```
Listing::List(array(
    "url"           => "customer/list",
    "form_id"       => "user_filter_form",
    "target_div_id" => "user_list_div",
    "button_id"     => "user_list",
    "data"	    => $page_data,
    "column"        => array(
                            array("head" => "Code", "column" => "a_code",
                            "width" => '30%',"sort" => "a_code",
                            "class" => "text-center"),
                            array("head" => "Town", "column" => "a_town",
                            "width" => '30%', "class" => "",
                            "sort" => "a_town"),
                            array("head" => "Address", "column" => "a_state",
                            "width" => '40%', "class" => "",
                            "sort" => "address")
                       ),
    "pager"          => "BOTH",
    "return_data"    => "HTML",
    "action"         => array("

                                &nbsp;",
                                "&nbsp;
                                &nbsp;",
                                '

                                '
                           )
));
```

### Pager Function

[](#pager-function)

Pager function is to show pagination in the listing page.

```
Listing::Pager();
```

ParamDescriptionpageThis is a mandatory parameter.The page object is passed ie the return value from the Page function.form\_idThe form id should be given in this parampage\_sizesThe array of values for the different page sizes for listing.Pager function will show a pagination widget along with the listing. The widget is as shown in the screenshot below. [![Pagination Image](https://camo.githubusercontent.com/958c7f81b6d0f0febd249bd264d7ce821f599b666872425a862e668704b05606/68747470733a2f2f692e696d6775722e636f6d2f757a6b676259792e706e67)](https://camo.githubusercontent.com/958c7f81b6d0f0febd249bd264d7ce821f599b666872425a862e668704b05606/68747470733a2f2f692e696d6775722e636f6d2f757a6b676259792e706e67)

##### Examples

[](#examples-2)

**pager**

```
Listing::Pager(array(
                "page" => $result,
                "form_id" => "postbackform",
                "page_sizes" => array(10,25,50,100,250)));
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Total

2

Last Release

1352d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f189de505b3944a9f493158e582abaceadd8b7d34cb27e6d4e7412c5397daa77?d=identicon)[dmplugin](/maintainers/dmplugin)

---

Top Contributors

[![dmplugin](https://avatars.githubusercontent.com/u/109280507?v=4)](https://github.com/dmplugin "dmplugin (3 commits)")[![midhun-dev-25](https://avatars.githubusercontent.com/u/243485208?v=4)](https://github.com/midhun-dev-25 "midhun-dev-25 (1 commits)")

### Embed Badge

![Health badge](/badges/easylist-easylist/health.svg)

```
[![Health](https://phpackages.com/badges/easylist-easylist/health.svg)](https://phpackages.com/packages/easylist-easylist)
```

###  Alternatives

[alexandresalome/assetic-extra-bundle

Extra feature for Assetic (asset directory)

1811.4k](/packages/alexandresalome-assetic-extra-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
