2017 © Pedro Peláez
 

library laravel-action-log

A laravel package of ActionLog

image

tuntron/laravel-action-log

A laravel package of ActionLog

  • Monday, November 21, 2016
  • by tuntron
  • Repository
  • 1 Watchers
  • 1 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 8 % Grown

The README.md

actionLog

Laravel 5 操作日志自动记录, (*1)

Installation

The ActionLog Service Provider can be installed via Composer by requiring the Tuntron/actionLog package and setting the minimum-stability to dev (required for Laravel 5) in your project's composer.json., (*2)

{
    "require": {

        "Tuntron/laravel-action-log": "dev-master"
    },

}

or, (*3)

Require this package with composer:, (*4)

composer require Tuntron/laravel-action-log dev-master

Update your packages with composer update or install with composer install., (*5)

In Windows, you'll need to include the GD2 DLL php_gd2.dll as an extension in php.ini., (*6)

Usage

To use the ActionLog Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this., (*7)

Find the providers key in config/app.php and register the ActionLog Service Provider., (*8)

    'providers' => [
        // ...
        'Tuntron\ActionLog\ActionLogServiceProvider',
    ]

for Laravel 5.1+, (*9)

    'providers' => [
        // ...
        Tuntron\ActionLog\ActionLogServiceProvider::class,
    ]

Find the aliases key in config/app.php., (*10)

    'aliases' => [
        // ...
        'ActionLog' => 'Tuntron\ActionLog\Facades\ActionLogFacade',
    ]

for Laravel 5.1+, (*11)

    'aliases' => [
        // ...
        'ActionLog' => Tuntron\ActionLog\Facades\ActionLogFacade::class,
    ]

Configuration

To use your own settings, publish config., (*12)

$ php artisan vendor:publish, (*13)

config/actionlog.php, (*14)

//填写要记录的日志的模型名称
    return [
        '\App\Users',
    ];

Last Step

run: $ php artisan migrate, (*15)

Demo

自动记录操作日志,数据库操作需按如下:, (*16)


update $users = Users::find(1); $users->name = "myname"; $users->save(); add $users = new Users(); $users->name = "myname"; $users->save() delete Users:destroy(1);

主动记录操作日志, (*17)


use ActionLog ActionLog::createActionLog($type,$content);

The Versions

21/11 2016

dev-master

9999999-dev

A laravel package of ActionLog

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by chenchen

laravel actionlog

21/11 2016

1.0.2

1.0.2.0

A laravel package of ActionLog

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by chenchen

laravel actionlog

21/11 2016

1.0.3

1.0.3.0

A laravel package of ActionLog

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by chenchen

laravel actionlog

21/11 2016

1.0.1

1.0.1.0

A laravel package of ActionLog

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by chenchen

laravel actionlog

21/11 2016

1.0

1.0.0.0

A laravel package of ActionLog

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by chenchen

laravel actionlog