PHP code example of digit7s / laravel-audit-toolkit
1. Go to this page and download the library: Download digit7s/laravel-audit-toolkit 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 Digit7s\AuditToolkit\Concerns\Auditable;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use Auditable;
protected function auditInclude(): array
{
return ['title', 'status', 'published_at'];
}
}
use Digit7s\AuditToolkit\Queue\AuditContextMiddleware;
final class RebuildSearchIndex
{
public function middleware(): array
{
return [AuditContextMiddleware::fromCurrent()];
}
}