spatie / laravel-activitylog

Log activity inside your Laravel app
https://docs.spatie.be/laravel-activitylog
MIT License
5.3k stars 712 forks source link

Log is not capturing from commands or queues #1181

Closed saitarun135 closed 1 year ago

saitarun135 commented 1 year ago

Consider an example to update a book price ,in my books model i am using trait and getActivitylogOptions() it was working fine.i will mention which scenario it was working and which scenario it was not working.

working scenario

Not working scenario

I am using like this in my queue class Books::where('id',$id)->update(['price'=>2354]);

Versions

Gummibeer commented 1 year ago

You are running the SQL update on query builder and not model level. That's why there's no event to capture.