简体   繁体   中英

How to Integrate PhpGrid with Laravel

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.

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__))));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM