| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public static function execute(array $tracking) |
||
| 19 | { |
||
| 20 | $flat = arrayFlattenKeys($tracking); |
||
| 21 | |||
| 22 | // Log traffic data to DB |
||
| 23 | TrackTraffic::query()->create($flat); |
||
| 24 | |||
| 25 | // Log JSON encoded activity to local log file |
||
| 26 | // todo: add to config |
||
| 27 | if (env('TRACK_TRAFFIC_LOGGING', false) == true) { |
||
| 28 | Log::channel('traffic')->info(json_encode($flat)); |
||
| 29 | } |
||
| 32 |