spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

[Proposal] How about replacing varchar with text/json? #33

Closed themsaid closed 8 years ago

themsaid commented 8 years ago

This package is perfect for logging actions with simple messages "Jack updated Post id:123.", but when it comes to logging complex actions with deep details I believe having the field as text/json and allow logging actions in a json format would make it more flexible.

Activity::log([
    'action' => 'update',
    'updates' => [
        ['name' => ['old name', 'new name'],
        ['price' => [36, 78]]    
    ]
]);

This will allow logging actions in more detail, and also can be handy when logging messages in a multilingual application.

freekmurze commented 8 years ago

This is a good feature that I'll keep in mind where developing the next major version of the package. ETA: somewhere this year (yeah, so many others things to do first :-))