• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to load the helper(url) automatically in CI4?

#6
(11-10-2016, 06:48 PM)ridho Wrote: Load the helper on BaseController, like this:

Code:
class BaseController extends CodeIgniter\Controller
{
  public function __construct(...$params)
  {
      parent::__construct(...$params);

      helper(['url','form']);
  }
}

Other controllers should extend this.

Thanks a lot, it work well now...
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply


Messages In This Thread
RE: how to load the helper(url) automatically in CI4? - by startbbs - 11-10-2016, 07:18 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.