Laravel5 Integration Walkthrough

Following is the guide to integrate PHP Grid Framework with Laravel 5.


Step1: Folder placements in Laravel.

There are 2 main folders in PHP Grid Framework package archive. You need to:

Copy the contents of lib/inc folder —> Laravel/app/Classes/phpgrid
Copy the contents of lib/js folder —> Laravel/js/phpgrid


The ‘app/Classes’ folder does not exist by default in laravel. You may create it for 3rd party class libraries.
Create another folder inside it with name ‘phpgrid’ and move all contents of ‘lib/inc’ in it. Final result will look like this:


In similar way, copy the files from lib/js to laravel/public/js/phpgrid. Final result should look like following:


Step2: Setting Controller code.

Here we included our library and rest code looks same as in our demos. Note the ‘\’ before class name while instantiating object. Finally we passed the output of render() function to view with a variable name ‘phpgrid_output’.

For demo purpose, we modified ‘laravel/app/Http/Controllers/WelcomeController.php’


Step2: Setting View code.

In view code, we included the JS/CSS files from the ‘js’ folder which we copied in step1.1
And using blade template variable output, we pushed the grid output in our desired place in html.
For demo purpose, we modified ‘laravel/resources/views/welcome.blade.php’


Note: PHP Grid Framework does not utilize ORM model layer of Laravel. It uses it’s own backend libraries.

Result: Get Set – Go!


Download all files to kick-start Laravel 5 with PHP Grid Framework.

Note: Demo comes with non-commercial / evaluation version of php grid framework. You can buy commercial usage license from this link.

PHP Database Table Editor v2.0

On various occasions, we want instant access to see or edit our database tables without having time to write a whole module with add, edit, delete, list, search (CRUD) operations. Whether your database is SQL Server, Oracle, DB2, MySQL or PGSQL — PHP Grid provides you easy solution that takes database credentials in config and provide table access in form of lightweight and rich featured PHP Grid. It will provide you complete functions within your existing application admin interface.

This lightweight, yet power-featured PHP Grid Database Editor is developed by very simple code OR we can say by just configuration. In main code logic, we simply passed the dropdown value of selected table in $g->table attribute, and that’s all!

$g = new jqgrid();
// set few params
$grid["caption"] = "Grid for '$tab'";
$grid["autowidth"] = true;
// set database table for CRUD operations
$g->table = $tab;
// render grid
$out = $g->render("list1");

You can extend this code to incorporate Access Control (ACL), Exporting Data (PDF, CSV, XLS) and several other features to make a powerful tool. We omitted them to show the code simplicity. This demo is based on MySQL, but you can have same function for MS SQL Server, Oracle, PgSQL databases.

Features in v1.2:

  • Selection of tables and fields for editing
  • Show/Hide particular fields in runtime
  • Bulk Editing data with multiselection
  • Grid Persistance (Column Resizing, Filters, Sort etc)

PHP Grid comes with free version and a licensed version. With Free version you can connect with others databases like MySQL, MS SQL Server, Oracle, PgSQL,DB2. Licensed version also supports many advance features which you can integrate in your application.

Complete code for this demo can be accessed from this link.

You can download and start saving your time now!


v2.0 – May 19 2016
v1.2 – Apr 25 2015
v1.0 – Apr 8 2014

Announcing PHP Grid v2.0

Today, we are glad to announce the release of PHP Grid v2.0.
Adding a lot of features, updates, optimizations and fixes. Thanks for all who contributed in evaluation.

Major Highlights:

  • Overall User Interface Enhancement, New Glyph Icons, Cozy Spacing Layout enabling it to be used on mobile devices easily.  Bootstrap3 is also supported now. This version comes with 3 layouts, i.e. Cozy, Bootstrap and Classic (old slick version).
  • New Professional Themes (Dark, Light, Colored). Metro Color Themes light/dark/black are recently added. You can also rollover your custom color theme using jQueryUI.
  • Integration with jQuery Plugins. Now you can connect plugins like datetime, autocomplete, select2, fancybox, ckeditor, jscolor and many others with simple process, enabling endless possibilities in features.
  • Added support for many missing database engines
  • And finally, all such features gave same experience on modern browsers.

Technical Change-log:

  • Added support for PHP v5.0+ to v7.0
  • PDO and MySqli Drivers support
  • New Glyphicon (Iconset) / Bootstrap3 support
  • Muliple File Uploading Support
  • Support for SQLite and Firebird databases
  • Advanced Search Conditions (Search in Groups)
  • Exporting selected rows and columns
  • Session data based grid (with add/edit/del)
  • Exporting Master Detail PDF
  • Image auto-embed support in PDF export
  • Select2 plugin support for data entry and search form
  • Over 200+ fixes and updates.

Next Actions:

Active license customers can request free upgrade using this link.

Get a complete Features Tour by vising our website.



Multiple Files Uploading

Now PHP Grid support multiple file upload option. You can multi-select the files as in screenshot and upload to server.

multi-upload-1 Files are uploaded in specified folder and file names are saved as comma separated value in file type field.


Active licensed customers can get latest build + demo which supports it.
Contact us at [email protected]

Logo, Faqs & Theme Redesigned!

Hello Everyone!

This is Abu from PHP Grid. As written in post title, we have rolled out several changes through out the website. Just wanted to give some quick updates:

  • Logo is redesigned. Our new flat logo will now be used in support forum and checkout page.

  • New responsive theme is rolled out for website.


  • Howtos & Faqs page is redesigned for fast lookup of your query. We’ve tons of faqs so make sure you review them before waiting for answer. Support forum search is also there for help.

What’s coming next … we’re working hard in rolling out new version of PHP Grid (v1.6) with lots of updates and new features, so stay tuned.

Firebird & SQLite Database Editor Support

We recently added support for Firebird & SQLite Databases. These fast, slick and reliable databases will help in running portable apps with PHP Grid. Thanks to PDO library, it’s integration is very with little configuration changes.


// Database config for SQLite
$db_conf = array();
$db_conf["type"] = "pdo";
$db_conf["server"] = "sqlite:../../sampledb/northwind.sqlite";
$db_conf["user"] = "";
$db_conf["password"] = "";
$db_conf["database"] = "";
$g = new jqgrid($db_conf);



// Database config for Firebird
$db_conf = array();
$db_conf["type"] = "pdo";
$db_conf["server"] = "firebird:host=localhost;dbname=C:/sampledb/employee.fdb";
$db_conf["user"] = "SYSDBA";
$db_conf["password"] = "masterkey";
$db_conf["database"] = "";
$g = new jqgrid($db_conf);

For updated version, contact us at [email protected].

Search with Multiple Group Conditions


We’ve added most robust and efficient complex searching method in PHPGrid.

This enables the more advanced search dialog allowing to add any number of complex group conditions. The user can now add or delete an unlimited number of conditions to perform the search as shown in screenshot.


This will formulate following search query, “( … )” refers groups in search query:

(name LIKE "%An%" OR company LIKE "%Mar%") 
(name LIKE "%Fa%" OR company LIKE "%Far%") 
gender = "male" AND client_id < 25

Hope you like this feature. Customers with active subscription can get latest build + demo via email.
We also offer discounted renewal prices for customers with expired subscription.
For any case, contact on our support team at ([email protected]).

Exporting selected Columns & Rows (at Runtime)

Now you can export selected rows and columns at runtime. This means no code change, Export selection options are now on accessible with grid operations toolbar.


In demo, select columns using column chooser and rows by multiselect option, then click Export selected button. This will export PDF of selected rows/cols. As the grid exports PDF format, the data table can be printed by your favorite PDF reader.

Export selected Columns and Rows