Download the PHP package motakabbir/activity-logger without Composer

On this page you can find all versions of the php package motakabbir/activity-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package activity-logger

Activity Logger Package

A powerful and easy-to-use Laravel package for automatically tracking model changes and user activities within your application. This package provides automatic model tracking and manual activity logging capabilities.

Requirements

Installation

To install the Activity Logger Package, you can use Composer:

Configuration

After installation, publish the configuration and migrations:

Then run the migrations:

Configuration Options

The package can be configured through the config/activity-logger.php file. Here are all available options:

Usage

Automatic Model Activity Logging

Simply add the LogsActivity trait to any model you want to track:

Now all create/update/delete operations on this model will be automatically logged!

Configuring Attribute Logging

You can configure which attributes to log in three ways:

  1. In your model using properties:

  2. In the configuration file for all models:

  3. Let the package log all attributes (default behavior if no configuration is provided)

The priority order is:

  1. Model-specific configuration ($logAttributes or $logExcept in the model)
  2. Global configuration in config/activity-logger.php
  3. Log all attributes if no configuration is found

Sensitive fields defined in sensitive_fields will always be masked with '**' in the logs, regardless of how attributes are configured.

Retrieving Logs for a Model

Manual Logging

You can also log activities manually using the facade:

Cleanup Old Records

To clean up old activity logs, you can use the provided artisan command:

This command will delete records older than the configured retention period (keep_logs_for_days).

Customization

Custom Activity Model

You can use your own activity model by specifying it in the configuration:

Your custom model should extend the base ActivityLog model or implement the same interface.

Queue Configuration

To improve performance, you can enable queued logging:

This will process the activity logging in the background.

Testing

To run the tests for the Activity Logger Package, use PHPUnit:

License

This package is open-source and available under the MIT License. See the LICENSE file for more information.

Contributing

Contributions are welcome! If you would like to contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please make sure to update tests as appropriate and follow the existing coding style.


All versions of activity-logger with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
laravel/framework Version ^8.0|^9.0|^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package motakabbir/activity-logger contains the following files

Loading the files please wait ....