File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Lightweight traffic tracking for CodeIgniter 4
55
661 . Install with Composer: ` > composer require tatter/visits `
772 . Update the database: ` > php spark migrate:latest -n Tatter `
8- 4 . Add to controller: ` service('visits')->record(); `
8+ 3 . Visits will be recorded automatically by a system event
99
1010## Features
1111
@@ -47,12 +47,11 @@ comments. If no config file is found in app/Config the library will use its own.
4747## Usage
4848
4949If installed correctly CodeIgniter 4 will detect and autoload the class, service, and
50- config. Use the service to load the class and record the current visit:
50+ config. The library includes an event listening for ` post_controller_constructor ` to
51+ record page loads. If you prefer to handle them manually you may use the service to load
52+ the class and record the current visit:
5153* ` service('visits')->record(); `
5254
53- ** Recommended:** Include this line in ` BaseController ` in the ` initController() `
54- method so traffic is recorded on every page load.
55-
5655## Accessing data
5756
5857This library provides a ` VisitModel ` and a ` Visit ` entity for convenient access to recorded
You can’t perform that action at this time.
0 commit comments