After using the package for a while you might have recorded a lot of activity. This package provides an artisan command activitylog:clean to clean the log.
Running this command will result in the deletion of all recorded activity that is older than the number of days specified in the delete_records_older_than_days of the config file.
You can leverage Laravel's scheduler to run the clean up command now and then.
You can define the days to keep for each call as command option. This will overwrite the config for this run.
php artisan activitylog:clean --days=7
##MySQL - Rebuild index & get back space after clean.
After clean, you might experience database table size still allocated more than actual lines in table,
execute this line in MySQL to OPTIMIZE / ANALYZE table.
OPTIMIZE TABLE activity_log;
OR
ANALYZE TABLE activity_log;
*this SQL operation will lock write/read of database, use ONLY when server under maintanance mode.