rmsramos / activitylog

Spatie Laravel activity logs inside of Filament.
MIT License
165 stars 36 forks source link

Bun on activating properties column #50

Open quasiperfect opened 2 months ago

quasiperfect commented 2 months ago

Package Version

v1.0.0

Laravel Version

Laravel 11.23.5

PHP Version

PHP 8.2.20

Problem description

i have activated the properties column in the listing view and i got an exception foreach() argument must be of type array|object, null given

Expected behavior

to see the list of events

Steps to reproduce

install the plugin, enable events on a model, go to the listing page and enable the properties column

this is the content of the logs table image

Reproduction repository (issue will be closed if this is not valid)

https://github.com/

Relevant log output

No response

WillianDamasceno commented 1 week ago

I'm facing the same problem.

This is not a solution, just an observation:

If you open the file vendor\rmsramos\activitylog\resources\views\filament\tables\columns\activity-logs-properties.blade.php you will find a @foreach($getState() as $key => $value), if you change it to @foreach($getState() ?? [] as $key => $value).

Maybe you could publish the view somehow and apply the change, but it would be way better if the package author fixed it.