Skip to content
Victor Tesoura Júnior edited this page Mar 21, 2024 · 2 revisions

Welcome to the activity-log wiki!

Activity Log provides a simple way to save eloquent model logs

  1. Installation
  2. Configuration
  3. Usage

Compatibility

Use the correct version that corresponds to your Laravel installation as seen below:

Laravel version Activity Log version
7.* 7.*
8.* 7.*
9.* 7.*
10.* 7.*

Structure example in activity_logs table

Request

{
    "ip":"127.0.0.1",
    "method":"http://localhost:8000/api/v1/users",
    "url":"POST",
    "inputs":{
        "email":"teste6@dois.com",
        "name":"Testefgfg",
        "lang":"pt",
        "password":"$2y$12$..."
    },
    "headers":{
        "accept":[
            "application/json"
        ],
        "content-type":[
            "application/json"
        ],
        "user-agent":[
            "PostmanRuntime/7.37.0"
        ],
        "postman-token":[
            "7fb3966c-6cff-4d0b-99d3-00a08c8e3372"
        ],
        "host":[
            "localhost:8000"
        ],
        "accept-encoding":[
            "gzip, deflate, br"
        ],
        "connection":[
            "keep-alive"
        ],
        "content-length":[
            "79"
        ],
        "cookie":[
            "remember_web_..."
        ]
    }
}

Properties (store)

{
    "changes":[
        {
            "key":"lang",
            "old":null,
            "value":"pt",
            "status":"new"
        },
        {
            "key":"name",
            "old":null,
            "value":"Testefgfg",
            "status":"new"
        },
        {
            "key":"email",
            "old":null,
            "value":"teste6@dois.com",
            "status":"new"
        },
        {
            "key":"id",
            "old":null,
            "value":13,
            "status":"new"
        }
    ]
}

Properties (update)

{
    "changes":[
        {
            "key":"name",
            "old":"Testefgfg",
            "value":"Outro",
            "status":"update"
        },
        {
            "key":"lang",
            "old":"pt",
            "value":"es",
            "status":"update"
        }
    ]
}
Clone this wiki locally