Welcome Guest, Not a member yet? Register   Sign In
how to load the helper(url) automatically in CI4?
#6

(This post was last modified: 11-10-2016, 07:19 PM by startbbs.)

(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



Theme © iAndrew 2016 - Forum software by © MyBB