| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function execute(): ?TrackTraffic |
||
| 36 | { |
||
| 37 | // Log JSON encoded activity to local log file |
||
| 38 | if (config('tracking.traffic.log')) { |
||
| 39 | Log::channel(config('tracking.traffic.log_channel'))->info(json_encode($this->tracking)); |
||
| 40 | } |
||
| 41 | |||
| 42 | // Store traffic data in database |
||
| 43 | if (config('tracking.traffic.store')) { |
||
| 44 | return ModelAdapter::TrackTraffic()::query()->create($this->tracking); |
||
| 45 | } |
||
| 46 | |||
| 47 | return null; |
||
| 48 | } |
||
| 50 |