What are Hooks in CakePHP?

by graciela.bogisich , in category: Technology , 3 months ago

What are Hooks in CakePHP?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by weston_dietrich , 3 months ago

CakePHP hooks are callback functions that are called before or after a model operation and defined in models.


List of some Hooks functions provided by CakePHP.

  1. beforeFind
  2. afterFind
  3. beforeValidate
  4. afterValidate
  5. beforeSave
  6. afterSave
  7. beforeDelete
  8. afterDelete
  9. onError

You can find top rated CakePHP books here.