laravel-auditing
laravel-auditing copied to clipboard
Error when implementing transformAudit
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Laravel |
Framework version | 11.0.3 |
Package version | 13.6" |
PHP version | 8.3.3 |
Steps to Reproduce
- Implement transformAudit()
<?php
namespace App\Models;
use App\Models\BaseModel;
use Illuminate\Support\Facades\Config;
use OwenIt\Auditing\Contracts\Auditable;
class AuditableModel extends BaseModel implements Auditable
{
use \OwenIt\Auditing\Auditable;
/**
* {@inheritdoc}
*/
public function transformAudit(array $data): array
{
$data['system_id'] = optional(Config::get('system'))->id;
return $data;
}
}
- composer update or php artisan package:discover --ansi
In Facade.php line 354:
A facade root has not been set.
I couldn't reproduce the problem, maybe it is related to your environment or your implementation
Closed due inactivity