1. Go to this page and download the library: Download duyngha/motrac 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/ */
duyngha / motrac example snippets
use Duyngha\ModelTracker\Traits\Trackable;
class Task extends Model
{
use Trackable;
}
use Duyngha\ModelTracker\Models\TrackerModel;
class TaskTrackable extends TrackerModel
{
protected $collection = 'task_revisions'; // This collection property determines name of collection will be created in MongoDB
}
use Duyngha\ModelTracker\Traits\Trackable;
class Task extends Model
{
use Trackable;
protected $trackableModel = TaskTrackable::class;
}
class Task extends Model
{
protected $trackingFields = [
'name'
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.