laravel-activitylog icon indicating copy to clipboard operation
laravel-activitylog copied to clipboard

Option to disable retrieving fresh model

Open niekbr opened this issue 10 months ago • 2 comments

I have added an option to the LogOptions in order to disable retrieving a fresh copy of the model. The default behavior is unchanged.

This can be useful if database permissions are limited. For example, when a public facing website is allowed to insert but not select from a privacy-sensitive table.

Let me know if you prefer a different synthax; happy to make improvements

niekbr avatar Apr 21 '24 08:04 niekbr

Hey, personally not really a case for it - @freekmurze any opinions if you would like to have it merged in and maintain it? If so I would like to have and see some tests for that one making it clear what it does and what the effects are.

Gummibeer avatar Apr 22 '24 08:04 Gummibeer

If this solution is not maintainable; it would also be possible to only extract $processingEvent == 'retrieved' to a separate function in order to be able to overwrite it (without adding it to the LogOptions. Let me know what has your preference. I will add tests if you are open for the PR!

niekbr avatar Apr 22 '24 11:04 niekbr