Skip to content

Configuration

Victor Tesoura Júnior edited this page Mar 21, 2024 · 1 revision

Configuration

You will see a new configuration file activitylog.php in your config directory. Below, I will explain the available configurations.

Causer enabled

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.

Causer identifier

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.

Causer provider

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.

Ignore attributes

Indicates which model attributes, should never be saved in activity logs changes properties. This is useful to prevent to expose sensitive information (Eg: "password").

Example

Screenshot 2024-03-21 at 11 57 36 AM

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
Clone this wiki locally