PHP code example of govelid / laravel-multi-auditable
1. Go to this page and download the library: Download govelid/laravel-multi-auditable 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/ */
govelid / laravel-multi-auditable example snippets
use ProjectAuditableTrait;
protected function getTimestampAttributes()
{
return ['updated_at', 'created_at'];
}
public function getAuditRecordId()
{
return $this->id;
}
public function getAuditFieldsNotes()
{
return $this->id;
}
public function getAuditFieldsForDelete()
{
return ['id'];
}
bash
php artisan make:auditable ProjectAuditable