jlxh / laravel-userlog by iat

User log for laravel
19
2
2
Package Data
Maintainer Username: iat
Maintainer Contact: i@iat.net.cn (iat)
Package Create Date: 2016-08-01
Package Last Update: 2016-08-15
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-15 15:16:51
Package Statistics
Total Downloads: 19
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel-UserLog (Laravel 5 Package)

Build Status StyleCI Latest Stable Version Total Downloads Latest Unstable Version License

Laravel-UserLog is a succinct and flexible way to add user logs to Laravel 5.

Installation

In order to install Laravel 5 UserLog, just add

"jlxh/laravel-userlog": ">=1.*"

to your composer.json. Then run composer install or composer update.

or you can run the composer require command from your terminal:

composer require jlxh/laravel:1.*

Then in your config/app.php add

    Jlxh\UserLog\UserLogServiceProvider::class,

in the providers array and

    'UserLog'   => Jlxh\UserLog\UserLogFacade::class,

to the aliases array.

Configuration

You can also publish the configuration for this package to further customize table names and model namespaces. Just use php artisan vendor:publish and a userlog.php file will be created in your app/config directory.

Now generate the UserLog migration:

php artisan userlog:migration

It will generate the <timestamp>_userlog_setup_tables.php migration. You may now run it with the artisan migrate command:

php artisan migrate

After the migration, one new table will be present:

  • user-log — stores user logs

Usage

Concepts

Let's create log as following:

use UserLog;
...

$log = UserLog::create(1, 'title', 'A', 'data', 'sql');

Troubleshooting

License

Entrust is free software distributed under the terms of the MIT license.

Contribution guidelines

Support follows PSR-1 and PSR-4 PHP coding standards, and semantic versioning.

Please report any issue you find in the issues page. Pull requests are welcome.