2017 © Pedro Peláez
 

library laravel-activity-log

Laravel Activity Log

image

bidzm/laravel-activity-log

Laravel Activity Log

  • Saturday, September 2, 2017
  • by abidnurulhakim
  • Repository
  • 0 Watchers
  • 0 Stars
  • 153 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 9 % Grown

The README.md

laravel-activity-log

Laravel Activity Log, (*1)

Installation

Make sure you have the MongoDB PHP driver installed. You can find installation instructions at http://php.net/manual/en/mongodb.installation.php, (*2)

Install through Composer, (*3)

composer require bidzm/laravel-activity-log

Configuration

And add a new mongodb connection config/database.php:, (*4)

'mongodb' => [
    'driver'   => 'mongodb',
    'host'     => env('DB_HOST', 'localhost'),
    'port'     => env('DB_PORT', 27017),
    'database' => env('DB_DATABASE'),
    'username' => env('DB_USERNAME'),
    'password' => env('DB_PASSWORD'),
    'options'  => [
        'database' => 'admin' // sets the authentication database required by mongo 3
    ]
],

Setup

Step 1: Register the Service Provider

Add the ActivityLogServiceProvider to the providers array in the config/app.php file;, (*5)

Jenssegers\Mongodb\MongodbServiceProvider::class,
Bidzm\ActivityLog\ActivityLogServiceProvider::class,

Step 2: Publish config

php artisan vendor:publish --provider="Bidzm\ActivityLog\ActivityLogServiceProvider" --tag="config"

Usage

To subscribe model for activity log just use Bidzm\ActivityLog\Loggable, (*6)

use Bidzm\ActivityLog\Loggable;

To add usage in your model, (*7)

use Loggable;

Credits

https://github.com/vjlau/laravel-activity-log - Activity Log for Laravel, (*8)

License

MIT - http://opensource.org/licenses/MIT, (*9)

The Versions

20/08 2017
20/08 2017
19/08 2017