Download the PHP package abdulbaset/activity-tracker without Composer
On this page you can find all versions of the php package abdulbaset/activity-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download abdulbaset/activity-tracker
More information about abdulbaset/activity-tracker
Files in abdulbaset/activity-tracker
Package activity-tracker
Short Description A comprehensive activity Tracker for Laravel projects.
License MIT
Homepage https://digitalatum.com
Informations about the package activity-tracker
Activity Tracker Package
A comprehensive activity tracking package for Laravel applications that logs various types of activities including authentication events, model changes, exceptions, route access, and database queries.
Features
- 🔐 Authentication Tracking: Login, logout, failed attempts, lockouts, registrations, email verifications, and password resets
- 📝 Model Changes: Create, update, delete, force delete, and restore operations
- ⚠️ Exception Logging: Various HTTP and system exceptions
- 🛣️ Route Access: Track accessed routes with request details
- 🔍 Query Logging: Monitor database queries with execution time
- 📱 Device Information: Browser, operating system, and device type detection
- 🔄 Flexible Storage: Store logs in database or files
- ⚙️ Highly Configurable: Extensive configuration options for each feature
Changelog
All notable changes to this project will be documented in the CHANGELOG.md file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Installation
You can install the package via composer:
Configuration
Publish the configuration file:
This will create a config/activity-tracker.php
file where you can configure various aspects of the package.
Migrations
After installing the package, you need to run the migrations to create the required database tables. To do this, use the following Artisan command:
Basic Usage
Manual Logging
Model Tracking
Add the Trackable
trait to your model:
Configuration Options
General Configuration
Authentication Events
Model Events
Exception Tracking
Exclusions
Database Schema
The package creates an activities
table with the following structure:
Column | Type | Description |
---|---|---|
id | bigint | Primary key |
subject | string | Activity subject |
causer_type | string | Model type of the causer |
causer_id | bigint | ID of the causer |
model_type | string | Related model type |
model_id | bigint | Related model ID |
event | string | Event type |
before | json | Previous state (for updates) |
after | json | New state (for updates) |
ip | string | IP address |
headers | json | Request headers |
query_parameters | json | URL query parameters |
request_method | string | HTTP method |
browser | string | Browser information |
device_type | string | Device type |
operating_system | string | OS information |
referring_url | string | Referrer URL |
current_url | string | Current URL |
description | text | Activity description |
properties | json | Additional properties |
created_at | timestamp | Creation timestamp |
updated_at | timestamp | Update timestamp |
API Resource
The package includes an API resource for formatting activity logs:
Events
The package tracks the following events:
Authentication Events
- Login
- Logout
- Failed Login
- Lockout
- Registration
- Email Verification
- Password Reset
Model Events
- Creating/Created
- Updating/Updated
- Deleting/Deleted
- Force Deleting/Force Deleted
- Restoring/Restored
Exception Events
- Not Found
- Unauthorized
- Method Not Allowed
- Too Many Requests
- Conflict
- Unprocessable Entity
- Access Denied
- Gone
- Precondition Failed
- Unsupported Media Type
- General Exceptions
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Support
For support:
- Email: [email protected]
- Create an issue in the GitHub repository
Donations 💖
Maintaining this package takes time and effort. If you’d like to support its development and keep it growing, you can:
- 🌟 Star this repository
- 📢 Sharing it with others
- 🛠️ Contribute by reporting issues or suggesting features
- ☕ Buy me a coffee
- ❤️ Become a sponsor on GitHub Sponsors
- 💵 Make a one-time donation via PayPal
Your support means a lot to me! Thank you for making this possible. 🙏
All versions of activity-tracker with dependencies
illuminate/support Version ^8.0|^9.0|^10.0
laravel/framework Version ^9.0|^10.0
jenssegers/agent Version ^2.6