You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug logUnguarded() works provided that $guarded is set explicitly in the model. If it is not set explicitly but globally set, say in AppServiceProvider using Model::unguard(); then nothing is logged.
To Reproduce
remove $fillable and $guarded from a model that use uses LogsActivity
call Model::unguard(); in AppServiceProvider in the boot method
set
public function getActivitylogOptions() : LogOptions
{
return LogOptions::defaults()->logUnguarded();
}
Make some changes to a model and save them
Expected behavior
Some changed properties should be logged but none are
Versions (please complete the following information)
PHP: 8.1
Database: MySql
Laravel: 9.38
Package: larvel-activitylog
The text was updated successfully, but these errors were encountered:
Describe the bug
logUnguarded()
works provided that$guarded
is set explicitly in the model. If it is not set explicitly but globally set, say inAppServiceProvider
usingModel::unguard();
then nothing is logged.To Reproduce
$fillable
and$guarded
from a model that use usesLogsActivity
Model::unguard();
inAppServiceProvider
in theboot
methodExpected behavior
Some changed properties should be logged but none are
Versions (please complete the following information)
The text was updated successfully, but these errors were encountered: