I have created custom helper laravel 5.2. I put in folder App/Helpers/Global.php.
and autoload files in composer.json :
"autoload": {
"files" : [
"App/Helpers/Global.php"
]
}
On my Windows PC, it's working fine, but when i deploy to VPS centos I got this error.
PHP Warning: require(/xxxx/xxxxx/public_html/xxxx/vendor/composer/../../App/Helpers/Global.php): failed to open stream: No such file or directory in /xxxx/xxxx/public_html/xxxx/vendor/composer/autoload_real.php on line 66
why Autoloading "files" is relative to vendor directory ? Thanks in advance.
It seems that OS on your VPS has case sensitive filename file system unlike Windows. Just replace "App/Helpers/Global.php"
with "app/Helpers/Global.php"
and it should help.