Welcome Guest, Not a member yet? Register   Sign In
How to make a Helper/Service that would be included with composer and autoloaded?
#1

(This post was last modified: 01-24-2023, 06:29 AM by Rinart.)

I'm in the process of making a Library (a single php class atm) that handles some document-related stuff. I'm also adding a Helper that allows for quick access to some of the Library features (mainly to use inside views). I know how to add and use Libraries, Helpers and Services.

But if I post my Library + Helper + Service config on the github and then request it in another new project with composer (which will put it in "vendor/myname/mylibrary/"), how do I make so the "helper" function in the new project will also look into my library /Helpers/ folder and that my library Service config would be merged with both CodeIgniter and the new app configs so the "service('library')" would work out of the box?
Reply
#2

Read https://codeigniter4.github.io/CodeIgnit...dules.html

By default, these are automatically discovered.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB