48

GitHub - orisintel/laravel-process-stamps: Logs which process created or modifie...

 4 years ago
source link: https://github.com/orisintel/laravel-process-stamps
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Laravel Process Stamps

Latest Version on Packagist Build Status Total Downloads

It is sometimes very useful to know which process created or modified a particular record in your database. This package provides a trait to add to your Laravel models which automatically logs that for you.

Installation

You can install the package via composer:

composer require orisintel/laravel-process-stamps

Configuration

php artisan vendor:publish --provider="\OrisIntel\ProcessStamps\ProcessStampsServiceProvider"

Running the above command will publish both the migration and the config file.

Usage

After adding the proper fields to your table, add the trait to your model.

// User model
class User extends Model
{
    use ProcessStampable;

Next, create a migration for your table and include the following:

$table->processIds();

That will generate the nessesary field names to track processes.

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK