owen-it / laravel-auditing-doc

Laravel Auditing Documentation
http://laravel-auditing.com
56 stars 62 forks source link

Correction of a bug in the documentation #89

Closed write-programmer closed 1 year ago

write-programmer commented 3 years ago

This case must be considered as two separate conditions. It is not possible to check if the value is present only in the "new values" array, because during the record 'created' event, "role_id" will not appear in the "old values" array yet, so we will get ErrorException "Trying to get property 'role_id' of non-object ". I think that it would also be worth considering one place where we could define what values from the array in each instance should be converted into what values provided by us. :)