Action Logger
User actions logger dependency for Laravel.
This package works exclusively within the Enso ecosystem.
The front end assets that utilize this api are present in the ui package.
For live examples and demos, you may visit laravel-enso.com
Installation
Comes pre-installed in Enso.
Features
- creates the
action-logger
middleware, theaction_logs
table and theActionLog
model - will log all access routes covered by the
action-logger
middleware - comes with the
ActionLogs
trait that defines the relationship to theActionLog
model, and should be included in your user model - each entry will record
user_id
,url
,route
name, httpmethod
verb and timestamps
Usage
Include the
action-logger
middleware on the routes that you want coveredAdd the
ActionLogs
trait on your user model, so you may retrieve the user's actions
Since the logged info contains the user_id, this means you cannot use the middleware on routes where the user information is unavailable (e.g. the user is not authenticated).
Contributions
are welcome. Pull requests are great, but issues are good too.
License
This package is released under the MIT license.