Skip to content

Commit 84ec6bd

Browse files
committed
Use system event
1 parent 5f57337 commit 84ec6bd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Config/Events.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php namespace Tatter\Visits\Config;
2+
3+
use CodeIgniter\Events\Events;
4+
use CodeIgniter\Config\Services;
5+
6+
Events::on('post_controller_constructor', function () {
7+
Services::visits()->record();
8+
});

0 commit comments

Comments
 (0)