Download the PHP package abdulbaset/activity-tracker without Composer

On this page you can find all versions of the php package abdulbaset/activity-tracker. 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-tracker

Activity Tracker for Laravel

Activity Tracker is a comprehensive logging package for Laravel projects, designed to track various activities within your application. It provides functionality to log events such as entity creation, updates, deletions, and retrievals, along with additional contextual information like user ID, IP address, device type, and more.

Table of Contents

Installation

Install

You can install the Activity Tracker package via Composer. Run the following command in your terminal:

To update the Activity Tracker package in your Laravel project, you can use Composer's update command. Here's how you can do it:

After running the update command in your Laravel project directory, and Composer will check for updates to the abdulbaset/activity-tracker package and its dependencies. If a newer version is available, Composer will download and install it, updating your project.

Configuration

After installing the package, publish the configuration file using the following command:

You can configure the Activity Tracker package by modifying the config/activity-tracker.php file. This file allows you to specify settings such as the log table name, log method (database or file), log file path, etc.

Migrations

After installing the package, you need to run the migrations to create the required database tables. To do this, use the following Artisan command:

  1. Running Migrations for Specific Tables

  2. Rolling Back Specific Migrations

  3. Refreshing Migrations for Specific Tables

Usage

There are multiple ways to integrate the Activity Tracker package into your Laravel application, allowing you to track various activities and events within your system, These three methods provide flexibility in how you integrate the Activity Tracker package into your Laravel application, allowing you to choose the approach that best fits your project's requirements.

Logging Events Directly

To log events directly in your application code, you can use the ActivityTracker facade provided by the package. Here's an example of how to log an event:

In this example, Model::class represents the entity being logged, 'retrieved' is the event type, 'Entity retrieved' is the event description, and ['example_key' => 'example value'] is additional information associated with the event.

Using Traits

With the ActivityTrackerTrait trait applied, you can call methods like logCreated, logUpdated, and logDeleted directly on your model instances:

Using Observers

The Activity Tracker Observer allows you to automatically log events when certain actions are performed on your models. To use the Activity Tracker Observer:

Examples

For usage examples and code snippets.

and assign inside boot method at AppServiceProvider namespace

Features

Author

The Activity Tracker package was created by Abdulbaset R. Sayed [email protected]

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on GitHub.

License

This Package is licensed under the MIT License - see the LICENSE file for details.


All versions of activity-tracker with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support 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 abdulbaset/activity-tracker contains the following files

Loading the files please wait ....