Search code examples
phpcodeignitercodeigniter-2codeigniter-3

In Codeigniter what is the purpose of hook ? Why we have to create?


i am new to codeigniter. In Every interview all asked about hooks. i am not getting that what is hook why i have to use it ? what the benefit of it.


Solution

  • This is example link for use it hooks in codeigniter

    https://qasimbadami.wordpress.com/2012/05/18/codeigniter-hooks-tutorial/

    Note : suppose you have big project and almost 100 controller , if every time to check session exists or not , each and every post request so than to use hook