If you find this website useful, your sponsorship would greatly support its ongoing development and maintenance. Learn more

Audit Trails

Log every user activity in audit trails, either by calling a model or using the add_user_log() helper. In the audit trails you can filter the audits by:

  • User
  • Section
  • Type
  • Date range

Autid Trails

Record activity

Record activity using the add_user_log helper

Pass an array of data to populate the user log. This adds to the user activity table.

The following keys are supported:

  • Title $data['title'] sets the activity title
  • Link $data['link'] a URL link
  • Reference identifier $data['id'] set a reference normally a model's primary key
  • Section $data['section'] identifty the section ie Users, Posts
  • Type $data['type'] sets the type of activity ie Create, Update, Delete

    
    add_user_log([
        'title'        => "Searched: ".$this->query,
        'link'         => route('admin.settings'),
        'reference_id' => auth()->id(),
        'section'      => 'Search',
        'type'         => 'Search'
    ]);
        

© 2024 Laravel AdminTW. All rights reserved.

Built by David Carr