managemize / laravel-fingerprints
Laravel FingerPrints for models
2.0.4
2023-01-11 00:50 UTC
Requires
- php: ^8.1
- illuminate/support: ^9.0
Requires (Dev)
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.0
README
This laravel package will allow your models to record the the created, updated and deleted by User FingerPrints
Installation
You can install the package via composer:
composer require managemize/laravel-fingerprints
Laravel Support
Upgrade from v1 to v2
Just rename the trait from your models from HasUserFingerPrint to HasFingerPrints
Usage
Add the trait to your models
use HasFingerPrints;
If you need to set custom fields for fingerprints :
protected array $userFingerPrintFields = [ 'create' => 'created_by', 'update' => 'updated_by', 'delete' => 'deleted_by', ];
If you need to activate or deactivate a fingerprint for a model:
protected array $userFingerPrint = [ 'create' => true, // false to deactivate 'update' => true, // false to deactivate 'delete' => true, // false to deactivate ];
Testing
composer test php artisan test
Changelog
Please see CHANGELOG for more information what has changed recently.
TODO
- Uuid support
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email managemize@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.