User log for laravel
Laravel-UserLog is a succinct and flexible way to add user logs to Laravel 5.
In order to install Laravel 5 UserLog, just add
to your composer.json. Then run
composer install or
or you can run the
composer require command from your terminal:
composer require jlxh/laravel:1.*
Then in your
providers array and
'UserLog' => Jlxh\UserLog\UserLogFacade::class,
You can also publish the configuration for this package to further customize table names and model namespaces.
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
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
Let's create log as following:
use UserLog; ... $log = UserLog::create(1, 'title', 'A', 'data', 'sql');
Entrust is free software distributed under the terms of the MIT license.
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.