2017 © Pedro Peláez
 

library laravel-activity

A simple Laravel model activity recording mechanism

image

chaseconey/laravel-activity

A simple Laravel model activity recording mechanism

  • Tuesday, June 30, 2015
  • by chaseconey
  • Repository
  • 1 Watchers
  • 6 Stars
  • 72 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

Laravel Activity Logger

StyleCI Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

A very simple activity logger build specifically for laravel that tracks actions performed by users based on model events., (*2)

Inspired by a Laracasts Lesson, (*3)

Quikstart

  1. Add package to composer.json, (*4)

    "require": {
      "laravel/framework": "5.0.*",
      "chaseconey/laravel-activity": "dev-master"
    }
    
  2. Add Service Provider to app.php config, (*5)

    'Chaseconey\ActivityRecorder\ActivityProvider'
    
  3. composer update, (*6)

  4. Publish the database migration for Activity table, (*7)

    php artisan vendor:publish --provider="Chaseconey\ActivityRecorder\ActivityProvider" --tag="migrations"
    
  5. php artisan migrate
  6. Add the trait to any model and enjoy!, (*8)


    use Chaseconey\ActivityRecorder\RecordsActivity; Class Tweet extends Model { use RecordsActivity; }

Details

This package is supposed to be a sort of drop-in addition to your code base for tracking when a user is performing any model events you want. The information is stored in a table, activities, and an Activity model is also provided for accessing that information., (*9)

Customizing Processed Events

By default, created, updated, and deleted events are persisted to the table. You can change which events are processed by adding a static property to the model you have added the trait to:, (*10)


Class Tweet extends Model { use RecordsActivity; /** * Which events to record for the auth'd user. * * @var array */ protected static $recordEvents = ['created']; }

The Versions

30/06 2015

dev-master

9999999-dev

A simple Laravel model activity recording mechanism

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging model event activity

17/04 2015

1.0.0

1.0.0.0

A simple Laravel model activity recording mechanism

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel logging model event activity