Welcome Guest, Not a member yet? Register   Sign In
How to call function from custom helper ?
#2

(This post was last modified: 10-02-2023, 07:34 AM by JustJohnQ.)

rename your file to i.e. myDate_helper. Save it in the App\Helpers folder.
I don't think it is necessary to namespace the file, I usually don't do that.

Before calling the method formatDateTime(), add the following line before calling it:
PHP Code:
helper('myDate'); 
Now you can call your method by using:
PHP Code:
$test formatDateTime($params); 

Also check out: https://stackoverflow.com/questions/6188...eigniter-4
Reply


Messages In This Thread
RE: How to call function from custom helper ? - by JustJohnQ - 10-02-2023, 07:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB