created by, updated by and deleted by added on model of your Laravel.
You can install the package via composer:
composer require amdadulhaq/record-activity-laravel
Open your migration file and add this table column. both are optional.
Schema::create('users', function (Blueprint $table) {
// ...
$table->withCreatedByAndUpdatedBy();
$table->withDeletedBy();
});
Now this traits add on your model and add fillable property.
<?php
namespace App\Models;
use AmdadulHaq\RecordActivity\RecordActivity;
// ...
class User extends Model
{
use CreatedByAndUpdatedBy, DeletedBy;
protected $fillable = [
// ...
'created_by',
'updated_by',
'deleted_by',
];
}
Now run the migrations with this command.
php artisan migrate
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.