PHPackages                             eyepax/activity\_log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. eyepax/activity\_log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

eyepax/activity\_log
====================

This library can be used to log the activities or requests to track later.

1152[1 PRs](https://github.com/EyepaxPrasanna/ActivityLog/pulls)PHP

Since Aug 17Pushed 8y ago2 watchersCompare

[ Source](https://github.com/EyepaxPrasanna/ActivityLog)[ Packagist](https://packagist.org/packages/eyepax/activity_log)[ RSS](/packages/eyepax-activity-log/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ActivityLog - An activity tracker for Laravel
=============================================

[](#activitylog---an-activity-tracker-for-laravel)

##### This library can be used to log the activities or requests to track later.

[](#this-library-can-be-used-to-log-the-activities-or-requests-to-track-later)

[Eyepax IT Consulting (Pvt) Ltd](http://eyepax.com)

Quick start
-----------

[](#quick-start)

Install with composer.

```
composer require "eyepax/activity_log:dev-master"

php artisan vendor:publish

php artisan migrate
```

Now, a table should have been created named "trn\_activity\_log". This is where all the activities are logged. Also, a config file named "activity\_log.php" will also be created inside config/ folder. You can add activities as key value pair, to identify the activity by ID later. Because, in the table, we store only the activity ID.

Then, add the *ActivityLogServiceProvider* class in the *providers* section in config/app.php file.

```
Eyepax\ActivityLogServiceProvider::class
```

Then, add the *ActivityLog* Facade in the *aliases* section in config/app.php file.

```
'ActivityLog' => Eyepax\Facades\ActivityLog::class
```

Using the ActivityLog
---------------------

[](#using-the-activitylog)

This is designed to use with ease, with configurable fields. The below table explains on the fields.

\#FieldDescriptionRequired/OptionalDefault value1performed\_user\_idIf there are any type of user who performed, then that specific type user ID (Ex: Member/Company)Optional02performed\_user\_typeIf there are any type of user who performed, then type ID (Ex: Member/Company)Required3performed\_user\_account\_idUsers table ID, who performed the actionRequired4action\_user\_account\_idUsers table ID, who receives the actionOptional05action\_user\_idIf there are any type of user who receives the effect from action, then that specific type user ID (Ex: Member/Company)Optional06action\_user\_typeIf there are any type of user who receives the effect from action, then type ID (Ex: Member/Company)Optional07action\_idActivity ID (Can check activity\_log.php config file)Required8platform\_typeIf the application has different sections, then the specific platform type (Ex: Portal A, Portal B)Optionalnull9action\_dataJSON encoded array of input dataRequired10action\_admin\_user\_idIf admin performs the activity, then admin user's IDOptionalnull11api\_typeWhether it is admin or front end (1 - Admin, 2 - Front end)Optional1Add this in the top of the file, where you use ActivityLog.

**use Eyepax\\ActivityLog;**

Then, just add the below code, where you want to log the activity. You can add the relevant fields from the above table.

- To add a single log entry,

```
ActivityLog::log(['action_data' => [
    'data' => Input::all()
]]);
```

- To add multiple log entries,

```
ActivityLog::logMultiples([
    ['action_data' => ['data' => Input::all()]],
    ['action_data' => ['data' => Input::all()]]
]);
```

- To get list of logs,

```
ActivityLog::getLogs($params, $page, $itemsPerPage);
```

```
$params - Array of filters. Field keys in the above table (except action_data) can be set here. Additionally, These keys can be set.
    1. "after": Datetime filed, which will give logs after the given time.
    2. "before": Datetime filed, which will give logs before the given time.

$page - Starts from 1. (Default: 1)

$itemsPerPage - Default is 20.

```

- To get details of a log entry,

```
ActivityLog::getLogDetails($logId);
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0aa9d666cd1e9b185fea318b0b6e81f3d6173d8cb9eacd7df401766868b19d3?d=identicon)[EyepaxPrasanna](/maintainers/EyepaxPrasanna)

---

Top Contributors

[![EyepaxPrasanna](https://avatars.githubusercontent.com/u/11972573?v=4)](https://github.com/EyepaxPrasanna "EyepaxPrasanna (22 commits)")

### Embed Badge

![Health badge](/badges/eyepax-activity-log/health.svg)

```
[![Health](https://phpackages.com/badges/eyepax-activity-log/health.svg)](https://phpackages.com/packages/eyepax-activity-log)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
