managemize / laravel-fingerprints
Laravel FingerPrints for models
Package info
github.com/managemize/laravel-fingerprints
pkg:composer/managemize/laravel-fingerprints
Requires
- php: ^8.1
- illuminate/support: ^9.0
Requires (Dev)
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
| Package Version | Laravel Version Support |
|---|---|
| ^1.0 | 9.x |
| ^2.0 | 9.x |
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.