Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when implementing transformAudit #914

Open
brunobacha opened this issue Mar 15, 2024 · 1 comment
Open

Error when implementing transformAudit #914

brunobacha opened this issue Mar 15, 2024 · 1 comment

Comments

@brunobacha
Copy link

brunobacha commented Mar 15, 2024

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

  1. 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;
    }

}
  1. composer update or php artisan package:discover --ansi
In Facade.php line 354:
                                   
  A facade root has not been set. 
@parallels999
Copy link

I couldn't reproduce the problem, maybe it is related to your environment or your implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants