Laravel-eloquent-logs is a fantastic package that can log what happens to your Eloquent models (created|updated|deleted|soft deleted|restored|force deleted) and keep an eye on who made the change, how, and when. This solution is simple to integrate and introduces minimal changes to your project: 1 migration, 1 model, and 1 trait.
Publish the migrations: php artisan vendor:publish --tag="eloquent-logs-migrations"
Pick an Eloquent model that you want to log the changes that happen to it and add the HasLogs trait to it.
You can load a model's logs using the eloquentLogs relationship: $example->eloquentLogs; $example->load('eloquentLogs'); App\Models\Example::with('eloquentLogs')->find($id); And you can query logs directly: // latest 5 logs with affected models ElaborateCode\EloquentLogs\Models\EloquentLog::with('loggable')->latest()->limit(5)->get()