x-blade/x-blade-visitor-tracker
最新稳定版本:v1.0.19
Composer 安装命令:
composer require x-blade/x-blade-visitor-tracker
包简介
A simple Laravel package to track website visitors and store them in a JSON file.
README 文档
README
XBlade Visitor Tracker is a simple Laravel package that logs website visitors and stores their information in a JSON file.
Features
- Logs visitor IP, User-Agent, and visit time
- Stores logs in a JSON file
- Provides a simple Blade view to display logs
- Configurable via
config/visitor-tracker.php - Excludes specific IPs from logging
Installation
You can install the package via Composer:
composer require x-blade/x-blade-visitor-tracker
Publish Configuration File
After installation, publish the configuration file:
php artisan vendor:publish --tag=visitor-tracker-config
This will create a config/visitor-tracker.php file where you can modify settings.
Publish Views
To publish the visitor log view:
php artisan vendor:publish --tag=visitor-tracker-views --force
View Visitor Logs
You can view visitor logs by using short tag html:
<x-blade-visitor-tracker-views />
This will display a simple table with all visitor entries.
Configuration
Modify config/visitor-tracker.php as needed:
return [ 'storage_path' => storage_path('app/visitor.json'), 'enabled' => true, 'excluded_ips' => [ '127.0.0.1', ], ];
storage_path: Defines where the JSON log file is stored.enabled: Enables or disables visitor logging.excluded_ips: IP addresses to exclude from tracking.
License
This package is open-source and licensed under the MIT License.
For more details, visit x-blade.dev. 🚀
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-04