PHP code example of justgabit / laravel-audit-trail
1. Go to this page and download the library: Download justgabit/laravel-audit-trail 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/ */
justgabit / laravel-audit-trail example snippets
public function getExtras(): array
{
// Here you would write logic to get your partner_id.
// Let's assume it is part of your User model for this example.
return [
'partner_id' => $this->user->partner_id
];
}
use Mueva\AuditTrail\AuditTrail;
use App\AuditTrailActions\Login;