phpGrid, Laravel 5 Integration: Class 'C_DataGrid' not found

Question:
I have tried the both method to integrate phpGrid with Laravel, but i have problems, with the last improved method i am getting this error:

FatalErrorException in DashboardController.php line 9: Class 'C_DataGrid' not found

I followed step by step all instructions with no success.


Solution:
It's because since 6.6 version phpGrid started to support PHP namespace. So the root namespace "\" will need to be updated. So in DashboardController.php, change the first line that calls phpGrid constructor to

$dg = new \phpGrid\C_DataGrid("SELECT * FROM orders", "orderNumber", "orders");


Feedback and Knowledge Base