-
-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
You will see a new configuration file activitylog.php
in your config
directory.
Below, I will explain the available configurations.
When this is set to false
, all the activity logs will be created without the causer morphy, and the causer_identifier
and causer_provider
will be ignored.
This Identifier is used to save activity log causer type, which is users
by default based on the authentication. This is required, when causer_enabled
is true
.
The only available provider is the auth
, which will get the authenticated user information using the default auth()
facade. This is required, when causer_enabled
is true
.
Indicates which model attributes, should never be saved in activity logs changes properties. This is useful to prevent to expose sensitive information (Eg: "password").
Look how the configs were set, for each row:
- Row 1: An authenticated user made a request.
ACTIVITY_LOG_CAUSER_ENABLED=true
ACTIVITY_LOG_CAUSER_IDENTIFIER=users
ACTIVITY_LOG_CAUSER_PROVIDER=auth
- Row 2: A non-authenticated user made a request.
ACTIVITY_LOG_CAUSER_ENABLED=true
ACTIVITY_LOG_CAUSER_IDENTIFIER=users
ACTIVITY_LOG_CAUSER_PROVIDER=auth
- Row 3: An authenticated user made a request.
ACTIVITY_LOG_CAUSER_ENABLED=false
ACTIVITY_LOG_CAUSER_IDENTIFIER=users
ACTIVITY_LOG_CAUSER_PROVIDER=auth
Great codes to reuse everywhere you want 🚀