Welcome Guest, Not a member yet? Register   Sign In
Hi, need definined a service to work to use from helpers functions
#2

You can load any of CodeIgniter 4 libraries in a help by calling there service.

Example:

PHP Code:
$request Services::request();
$uri     $request->uri

You can load a help within a help.

Example:

PHP Code:
helper('text'); 

If it is a custom libraries just create a service for it or autoload it in the autoloader.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Hi, need definined a service to work to use from helpers functions - by InsiteFX - 01-26-2021, 09:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB