codestepsbd / historykeeper
This will capture data for selected table for insert, update and delete
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/codestepsbd/historykeeper
This package is auto-updated.
Last update: 2025-12-06 21:00:26 UTC
README
The Laravel HistoryKeeper package provides functionality to manage history tables and triggers in your Laravel application. It allows you to create, update, and manage history tables and triggers easily.
Installation
You can install the package via Composer. Run the following command in your terminal:
composer require codestepsbd/historykeeper:dev-master
Database Migration
After installation you have to run migration for creating the table_history_with_settings table.
You can run the migration using Laravel's migration command:
php artisan migrate
Usage
Commands
The package provides a console command app:update-history-tables-and-triggers with several options:
--makeNewHistoryTable=false: Creates a new history table if set totrue.--runTest: Runs a test to understand package is working or not.--scanMismatch: Scans for mismatches between the base table and its history table.
You can use the command with options like this:
php artisan app:update-history-tables-and-triggers --makeNewHistoryTable=true --runTest --scanMismatch
Routes
The package defines several routes under the history-keeper prefix:
/: Displays the index page of history data./url-command/{value?}: Provides a command URL endpoint. here value can berunTestfor run test,truefor creating history tables andscanMismatchfor Scans for mismatches between the base table and its history table on web browser.
Middleware
Middleware can be applied to the history-keeper routes using the config("historyKeeper.middleware") configuration.
License
This package is open-source software licensed under the MIT license.
Feel free to customize this according to your package's specific details and requirements.