![]() |
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']); So... any help and/or additional insights how the Events work? I didn't figure it yet, obviously ![]() Quote:Note that the second parameter can be any form of callable that PHP recognizes: It seems you need to learn PHP. See https://www.w3schools.com/php/keyword_static.asp |
Welcome Guest, Not a member yet? Register Sign In |