PHP code example of amdadulhaq / record-activity-laravel

1. Go to this page and download the library: Download amdadulhaq/record-activity-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

amdadulhaq / record-activity-laravel example snippets


Schema::create('users', function (Blueprint $table) {
    // ...
    $table->withHasCreatorAndUpdater();
    $table->withHasDeleter();
});



namespace App\Models;

use AmdadulHaq\RecordActivity\HasCreatorAndUpdater;
use AmdadulHaq\RecordActivity\HasDeleter;
// ...

class User extends Model
{
    use HasCreatorAndUpdater, HasDeleter;

    protected $fillable = [
        // ...
        'created_by',
        'updated_by',
        'deleted_by',
    ];
}
bash
php artisan migrate