spatie/laravel-activitylog ? reverse-engineered prompt
Reverse engineered prompt
Build me a Laravel package that keeps track of what users do in the app.
I want it to let me write simple logs like activity()->log('...'), and also attach the model being acted on, the user who caused it, and any extra data I want to store. It should save everything in an activity_log table and let me read those records back through an Activity model. If a model gets updated, created, or deleted, it should be able to log that automatically too, including what changed and what the old values were.
Make it feel easy to install and use in a normal Laravel app, with a config file and a migration I can publish if needed. Please include sensible tests and keep the code clean and documented enough that someone can understand how to use it from the README. If anything depends on current Laravel behavior, look up the latest docs online before finishing.
Are you gonna build this?
make sure you review the code using coderabbit