0

I am trying to integrate Phpgrid with laravel 4. I tried putting it in the vendor module and did composer dump-autload, but it is throwing errors. I also tried putting phpgrid folder in the library and then autoload it, but nothing seems to be working. I keep getting this PHP Fatal error: Could not convert the script from the detected encoding "UTF-8" to a compatible encoding in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php on line 118 error when i do composer dump-autoload. Can somebody let me know the steps. I browsed for resources, looks like not much resources are available about this kind of integration.

thanks in advance.

akr
  • 739
  • 4
  • 15

1 Answers1

3

This help me: setting up phpChart in laravel phpGrid should work the same way. Basically you need to make sure the SERVER_ROOT path is set correctly.

If you are not sure, you can use the following script. It generates the correct corresponding SERVER_ROOT value based on your current executing script.

define('SERVER_ROOT', str_replace(str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT'])),'', str_replace('\\', '/',dirname(__FILE__))));
Community
  • 1
  • 1
devXen
  • 3,013
  • 3
  • 35
  • 44
  • There you go. Official from phpGrid: http://phpgrid.com/example/phpgrid-laravel-5-twitter-bootstrap-3-integration/ – KSchoniov Jun 25 '15 at 03:33