1. Go to this page and download the library: Download pacificinternet/userstamps 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/ */
use Pacificinternet\Userstamps\Userstamps;
class Foo extends Model {
use Userstamps;
}
use Pacificinternet\Userstamps\Userstamps;
class Foo extends Model {
use Userstamps;
const CREATED_BY = 'alt_created_by';
const UPDATED_BY = 'alt_updated_by';
const DELETED_BY = 'alt_deleted_by';
}
$model->creator; // the user who created the model
$model->editor; // the user who last updated the model
$model->destroyer; // the user who deleted the model
$model->stopUserstamping(); // stops userstamps being maintained on the model
$model->startUserstamping(); // resumes userstamps being maintained on the model