PHPackages                             dmyers/laravel-activity - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dmyers/laravel-activity

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dmyers/laravel-activity
=======================

A simple activity feed package for Laravel 4.

7143PHP

Since Jul 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/dmyers/laravel-activity)[ Packagist](https://packagist.org/packages/dmyers/laravel-activity)[ RSS](/packages/dmyers-laravel-activity/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Activity Package for Laravel 4
==============================

[](#activity-package-for-laravel-4)

Activity is a activity/news feed system for Laravel 4 applications.

Installation via Composer
-------------------------

[](#installation-via-composer)

Add this to you composer.json file, in the require object:

```
"dmyers/laravel-activity": "dev-master"
```

After that, run composer install to install Activity.

Add the service provider to `app/config/app.php`, within the `providers` array.

```
'providers' => array(
    // ...
    'Dmyers\Activity\ActivityServiceProvider',
)
```

Add a class alias to `app/config/app.php`, within the `aliases` array.

```
'aliases' => array(
    // ...
    'Activity' => 'Dmyers\Activity\Activity',
)
```

Publish the package's model, migration, and view.

```
php artisan model:publish dmyers/laravel-activity
php artisan migration:publish dmyers/laravel-activity
php artisan view:publish dmyers/laravel-activity
```

Finally, add the trait to the models you want to track activity on.

```
use ActivityTrait;

protected $activity_item_field = 'id';

protected $activity_doer_field = 'user_id';

protected $activity_events = array('created', 'updated', 'deleted');

protected $activity_feed_type = 'user';
```

Usage
-----

[](#usage)

First get an instance of an item type (model):

```
$object = Model::find(1);
```

Fetch all the activity:

```
$object->activity(array(
	'id'        => $activity_id, // optional
	'doer_id'   => $doer_id, // optional
	'victim_id' => $victim_id, // optional
	'item_id'   => $item_id, // optional
	'item_type' => $item_type, // optional
	'feed_type' => $feed_type, // optional
));
```

Track an activity event:

```
$object->addActivity($item_type, $doer_id, $victim_id, $action);
```

Update an activity event:

```
$object->updateActivity($item_type, $doer_id, $victim_id, $action);
```

Delete an activity event:

```
$object->deleteActivity($item_type, $doer_id, $victim_id, $action);
```

Display an activity feed:

```
$object->renderActivityFeed($type, $doer_id, $victim_id);
```

Push a feed into another activity feed:

```
$object->pushActivityFeed($type, $doer_id, $victim_id);
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

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/70bc994aa5551eb623dafac5074a508e33176eba575962e63039b7106b3ccd56?d=identicon)[adrianmejias](/maintainers/adrianmejias)

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

---

Top Contributors

[![dmyers](https://avatars.githubusercontent.com/u/207171?v=4)](https://github.com/dmyers "dmyers (25 commits)")

### Embed Badge

![Health badge](/badges/dmyers-laravel-activity/health.svg)

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

###  Alternatives

[mcguffin/acf-quick-edit-fields

WordPress Plugin implementing Column Displaying, QuickEdit and BulkEdit for Advanced Custom Fields (ACF)

36462.4k](/packages/mcguffin-acf-quick-edit-fields)

PHPackages © 2026

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