Download the PHP package patoui/model-history without Composer

On this page you can find all versions of the php package patoui/model-history. 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 model-history

๐Ÿ“ Laravel Model History Package

A Laravel package that allows you to track changes to your Eloquent models (history) in an opt-in fashion. The package provides extensibility, so you can store changes in your preferred storage system.

โœจ Features

๐Ÿ“ฆ Installation

You can install the package via composer:

Optionally, you can publish the config file with:

Optionally, you can publish and run the migrations with:

You can publish both config and migrations at once with:

โš™๏ธ Configuration

After publishing the config file, you can customize the package behavior by editing config/model-history.php.

๐ŸŽฏ Customizing the model history

You can customize which model is used for storing changes:

๐Ÿšซ Customizing Excluded Properties

You can customize which properties are excluded from the model history by modifying the exclude_properties array in your published config file. For example, if you want to also exclude password fields and any _token fields:

๐Ÿ”ง Model configuration

You may add an additional property to the model to override the default configuration of excluded properties

๐Ÿš€ Usage

๐Ÿ“š Basic Usage

To start tracking changes for a model, simply add the TrackModelHistory trait and the TrackModelHistoryContract interface:

Now any changes to this model will be automatically tracked:

๐Ÿ—„๏ธ Using non-Eloquent storage

This package provides a ModelHistoryRepositoryContract so you may implement your own repository. Once implemented you can simply override the registered singleton in your app service provider

๐Ÿ  Using ClickHouse

Here's an example using ClickHouse with the Laravel ClickHouse package.

First, install the Laravel ClickHouse package:

Complete the setup from the package.

Create a migration for the changes table:

Create a ClickHouse model for the model history:

Now publish the config

Now update the model with your own

๐Ÿงช Testing

๐Ÿ“‹ Changelog

Please see CHANGELOG for more information on what has changed recently.

๐Ÿ‘ฅ Credits

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.


All versions of model-history with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.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 patoui/model-history contains the following files

Loading the files please wait ....