Download the PHP package temistocle1998/laravel-model-tracker without Composer

On this page you can find all versions of the php package temistocle1998/laravel-model-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 laravel-model-tracker


Laravel Logo

Laravel Model Tracker

Latest Stable Version Total Downloads License

A lightweight Laravel package to track changes in your models. Automatically logs all changes, including old values, new values, and the user responsible for the changes.

Features

Requirements

Installation

  1. Install via Composer:

  2. Publish configuration and migration files:

  3. Add the TracksChanges trait to your model:

    In any model where you want to track changes, simply include the TracksChanges trait:

Configuration

The package comes with a config file that can be customized to suit your needs. The configuration file can be found at config/tracker.php.

Example Config:

Usage

Once the package is set up, any changes made to the models using the TracksChanges trait will automatically be logged. The logs are stored in the model_changes table.

Example of Change Logs

When a model is updated, the following log is created in the model_changes table:

model_type model_id user_id changes created_at
App\Models\Product 1 2 {"name": {"old_value": "Old Name", "new_value": "New Name"}} 2023-01-01 12:00:00

Retrieving Model Changes

You can fetch model changes using the ModelChange model.

Displaying Changes in Your View

You can also display the changes in your views:

Contributing

Feel free to submit a pull request if you'd like to contribute to this package. All contributions are welcome!

License

This package is licensed under the MIT License. See the LICENSE file for details.


All versions of laravel-model-tracker with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.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 temistocle1998/laravel-model-tracker contains the following files

Loading the files please wait ....