varunazad / laravel-user-activity-log
There is no license information available for the latest version (dev-main) of this package.
Simple Laravel user activity logger
Package info
github.com/varunazad/laravel-user-activity-log
pkg:composer/varunazad/laravel-user-activity-log
dev-main
2025-07-30 14:12 UTC
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0|^9.0|^10.0
This package is not auto-updated.
Last update: 2026-03-26 15:51:01 UTC
README
A simple and extensible Laravel package to log user and customer activities automatically—similar to Laravel Telescope but lightweight and focused on customer-level activity tracking.
🚀 Features
- ✅ Logs all authenticated user activities
- 🧠 Tracks request method, route, user ID, IP, browser, etc.
- 🔍 View logs easily in DB or optional web view
- 🔧 Configurable via
config/user-activity-log.php - 📦 Supports publishing config and migrations
⚙️ Configuration
Publish the config and migration files:
php artisan vendor:publish --tag=user-activity-log-config
php artisan migrate
This will: Create config/user-activity-log.php Run the log table migration (user_activity_logs)
🧩 Usage
Use Trait like this:
use Varunazad\LaravelUserActivityLog\Traits\LogsActivity;
class User extends Authenticatable
{
use LogsActivity;
}
This will: The logging is automatic for each request made by an authenticated user. You can customize which actions to log in the config.
🛠️ Config Options
return [
'enabled' => true,
'log_guests' => false,
'log_methods' => ['GET', 'POST', 'PUT', 'DELETE'],
'excluded_routes' => ['login', 'logout'],
'user_model' => App\Models\User::class,
] ];
📦 Installation
composer require varunazad/laravel-user-activity-log ---