Skip to content
This repository was archived by the owner on Feb 24, 2023. It is now read-only.

$auditEvent is protected #99

Open
r0lodex opened this issue Mar 11, 2022 · 1 comment
Open

$auditEvent is protected #99

r0lodex opened this issue Mar 11, 2022 · 1 comment
Labels

Comments

@r0lodex
Copy link

r0lodex commented Mar 11, 2022

$article->auditEvent = 'whateverYouWant';

Since $auditEvent is a protected variable, assigning a value with customAudit would render an empty string.

@simonmaass
Copy link

simonmaass commented Oct 18, 2022

Also when enabling strict mode: https://laravel.com/docs/9.x/eloquent#configuring-eloquent-strictness

Model::shouldBeStrict(! $this->app->isProduction());

It will print an error:

The attribute [auditEvents] either does not exist or was not retrieved for model [App\Models\User].

image

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

No branches or pull requests

3 participants