![]() |
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'); PHP Code: $test = formatDateTime($params); Also check out: https://stackoverflow.com/questions/6188...eigniter-4 |
Messages In This Thread |
How to call function from custom helper ? - by petrogromovo - 10-02-2023, 07:22 AM
RE: How to call function from custom helper ? - by JustJohnQ - 10-02-2023, 07:30 AM
RE: How to call function from custom helper ? - by AlexSchneider - 12-04-2023, 02:11 PM
RE: How to call function from custom helper ? - by kenjis - 12-04-2023, 02:35 PM
RE: How to call function from custom helper ? - by AlexSchneider - 12-04-2023, 07:29 PM
RE: How to call function from custom helper ? - by vitnibel - 12-04-2023, 06:29 PM
RE: How to call function from custom helper ? - by kenjis - 12-05-2023, 05:43 PM
|