NOTE: For more complete version, Visit Laravel 5.5 Integration Guide.

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

laravel_result

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

laravel_step1_1

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:

laravel_step1_2

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

laravel_step1_3

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’

laravel_step2

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’

laravel_step3

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

Result: Get Set – Go!

laravel_result

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.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?