Looking to hire Laravel developers? Try LaraJobs

laravel-activity-recorder maintained by bitfumes

Description
Your Package Description here
Author
Last update
2019/10/26 10:11 (dev-master)
License
Links
Downloads
297

Comments
comments powered by Disqus

Activity Recorder

Install

composer require bitfumes/laravel-activity-recorder

Usage

This package record model events in activities table in your database.

Using Trait

use Illuminate\Database\Eloquent\Model;
use Bitfumes\Activity\Traits\RecordActivity;

class Item extends Model
{
    use RecordActivity;
}

Activity To Record

If you does't specify, then it will record only created model event.

Record other activities just need to specify a static variable in your model to track other model events also.

class Item extends Model
{
    use RecordActivity;

    protected static $eventsToRecord = ['created','deleted'];
}

Now this will also going to record deleted event of that model.

Testing

Run the tests with:

vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email sarthak@bitfumes.com instead of using the issue tracker.

License

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