2017 © Pedro Peláez
 

library laravel-activitylog

This laravel 5 package provides to log the activity of the users

image

siduko/laravel-activitylog

This laravel 5 package provides to log the activity of the users

  • Tuesday, October 25, 2016
  • by siduko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel 5 Activity Log

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

This laravel 5 package provides to log the activity of users. It can also automatically log model events, custom message log. You can custom log handler to saving another destination Unless you can use built in handler as EloquentHandler (using database ) or LogHandler (using log), (*2)

Install

Via Composer, (*3)

``` bash $ composer require siduko/laravel-activitylog, (*4)


Or add `composer.json` ``` json "require": { '...', "siduko/laravel-activitylog":"v1.0-dev" }

Usage

Install the service provider to config.php ``` php // config/app.php, (*5)

'providers' => [ '...', \LaiVu\ActivityLog\ActivityLogServiceProvider::class, ],, (*6)

'aliases' => [ '...', 'ActivityLog'=>\LaiVu\ActivityLog\ActivityLogFacade::class, ],, (*7)


You can publish the migration with: ``` bash php artisan vendor:publish --provider="LaiVu\ActivityLog\ActivityLogServiceProvider" --tag="migrations"

After you run migration, (*8)

``` bash php artisan migrate, (*9)


You can optionally publish the config file with: ``` bash php artisan vendor:publish --provider="LaiVu\ActivityLog\ActivityLogServiceProvider" --tag="config"

Default config, (*10)

``` php <?php /** * Created by PhpStorm. * User: Lai Vu * Date: 10/24/2016 * Time: 3:52 PM */, (*11)

return [ /*** * When set to true, activity log will be active */ 'enabled' => env('ACTIVITY_LOGGER_ENABLED', true),, (*12)

'activity_model' => '\LaiVu\ActivityLog\Models\Activity',

'default_log_name' => 'default',

/***
 * Default activity log handle, using to setting log handler
 * You can custom a handler and set to here
 *  Example:
 *   'default' => ['eloquent','log','custom']
 */
'default' => ['eloquent'],

/**
 * When set to true, the subject returns soft deleted models.
 */
'subject_returns_soft_deleted_models' => false,

'delete_records_older_than_days' => 365,

/***
 * List log handlers, you can add new custom handler
 * `driver` is classpath of log handler
 */
'handlers' => [
    'log' => [
        'driver' => '\LaiVu\ActivityLog\Handlers\LogHandler'
    ],
    'eloquent' => [
        'driver' => '\LaiVu\ActivityLog\Handlers\EloquentHandler'
    ]
]

];, (*13)


### Basic Usage This is the most basic way to log activity: ``` php activity()->log('Look mum, I logged something');

Or, (*14)

``` php ActivityLog::log('Look mum, I logged something');, (*15)


## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*16)

Security

If you discover any security related issues, please email laivu.fly@gmail.com instead of using the issue tracker., (*17)

Credits

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions

25/10 2016

dev-master

9999999-dev https://github.com/siduko/laravel-activitylog

This laravel 5 package provides to log the activity of the users

  Sources   Download

MIT

The Requires

 

The Development Requires

siduko laravel-activitylog