Events (SOLVED) |
Can we do this by extending Events?
PHP Code: This s my CustomEvents.php file --- when I tryna trigger this by PHP Code: \CodeIgniter\Events\Events::trigger('ClientAdded'); do I have to mention all the events on Events.php?
Learning Codeigniter
You need to load your CustomEvents.php by yourself.
For example, add `require 'path/to/your/CustomEvents.php';` in app/Config/Events.php. (06-12-2023, 04:44 PM)kenjis Wrote: You need to load your CustomEvents.php by yourself. Thank you @kenjis I was thinking of this but I don't know why I didn't try. Now it's working as expected.
Learning Codeigniter
|
Welcome Guest, Not a member yet? Register Sign In |