Skip to content

Implement Activity Log System #106

Description

@trtajim

Summary

Implement a centralized activity log system to track important user actions across the platform.

Requirements

  • Create an activity_logs table.
  • Log the authenticated user, action, target type, target ID (if applicable), IP address, and timestamp.
  • Display logs in the admin panel with pagination and filtering.

Events to Log

Authentication

  • User logged in
  • User logged out

Resources

  • Created resource (ID: 42)
  • Updated resource (ID: 42)
  • Deleted resource (ID: 42)

Folders (Nodes)

  • Created folder (ID: 15)
  • Updated folder (ID: 15)
  • Deleted folder (ID: 15)

Subjects

  • Created subject (ID: 7)
  • Updated subject (ID: 7)
  • Deleted subject (ID: 7)

Blogs

  • Created blog (ID: 10)
  • Updated blog (ID: 10)
  • Deleted blog (ID: 10)

Users & Roles

  • Created user (ID: 5)
  • Updated user (ID: 5)
  • Deleted user (ID: 5)
  • Assigned role
  • Removed role

Example Log Entries

  • Tajim logged in
  • Tajim created a resource (ID: 42)
  • Tajim updated a resource (ID: 42)
  • Tajim deleted a resource (ID: 42)
  • Tajim created a folder (ID: 15)
  • Tajim created a subject (ID: 7)
  • Tajim assigned the Editor role to Mubin Tahmid Kabbo

Notes

  • Use a reusable logging service/helper so all modules log activities consistently.
  • Prefer model observers/events where appropriate instead of duplicating logging logic in controllers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions