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

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.
Tafsir NU adalah sebuah aplikasi yang berisi kumpulan kajian kitab kuning yang disampaikan oleh Kiai Nahdhotul Ulama seperti Gus Baha, gus mus, dan kiai lainnya dalam format audio.
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB