CodeIgniter Forums
Helper functions outside application and system folders - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: Helper functions outside application and system folders (/thread-65600.html)



Helper functions outside application and system folders - portaflex - 06-29-2016

Hello, I have a set of helpers that used by a number of applications in CI3. They are in the vendor folder and loaded with composer. I added to composer.json:

Code:
"autoload": {
       "files": [
        "vendor/diego/helpers/campos_helper.php",
        "vendor/diego/helpers/tablas_helper.php",
        "vendor/diego/helpers/vistas_helper.php",
        "vendor/diego/helpers/html_helper.php",
        "vendor/tcpdf/tcpdf.php"
       ],
"psr-4": {
"CodeIgniter\\": "system/",
        "Diego\\Admin\\": "vendor/diego/admin/",
        "Diego\\Compra\\": "vendor/diego/compra/",
        "Diego\\Foros\\": "vendor/diego/foros/"
}
},

But I don't get them, the helpers, available with Codeigniter4. Is there any way to keep them outside application and system folder. I read the manual but don't understand quite well.

Thank you.


RE: Helper functions outside application and system folders - portaflex - 06-29-2016

In /application/Config/App.php

public $composerAutoload = '../vendor/autoload.php';