dkvhin / laravel-model-histories
Laravel plugin primarily use to create timeline or history entries for models.
v12.0.0
2025-03-19 08:47 UTC
Requires
- php: ^8.2
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- larastan/larastan: ^2.9
README
composer require dkvhin/laravel-model-histories
Publish Configs
php artisan vendor:publish --provider="Dkvhin\LaravelModelHistories\LaravelModelHistoriesServiceProvider" --tag="config"
php artisan vendor:publish --provider="Dkvhin\LaravelModelHistories\LaravelModelHistoriesServiceProvider" --tag="migrations"
Usage
Add interface and Trait to Your Model
use Dkvhin\LaravelModelHistories\HasHistories; use Dkvhin\LaravelModelHistories\HasHistoriesTrait; class User extends Model implements HasHistories { use HasHistoriesTrait; /** * Exclude from history * @var array<string> */ public array $excludeFromHistory = [ 'password' ]; }