Welcome Guest, Not a member yet? Register   Sign In
Events and Controllers...
#1

Hi everyone,
I like to achieve simply logging the views of my pages in the database. Still learning CI4 though...
I found the Events and was looking at it the whole night. I have a Controller "Statistics" as well as a model. I've read I have to add the full namespace like App\Controllers\Statistics.
But
PHP Code:
Events::on('post_system', ['\App\Controllers\Statistics''write']); 
won't work still as it let's me know it isn't called static.

So... any help and/or additional insights how the Events work? I didn't figure it yet, obviously Smile
Reply


Messages In This Thread
Events and Controllers... - by trunky - 09-15-2023, 12:51 PM
RE: Events and Controllers... - by kenjis - 09-15-2023, 04:14 PM
RE: Events and Controllers... - by devo - 09-15-2023, 10:54 PM
RE: Events and Controllers... - by trunky - 09-16-2023, 07:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB