Download the PHP package inisiatif/laravel-event-history without Composer
On this page you can find all versions of the php package inisiatif/laravel-event-history. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download inisiatif/laravel-event-history
More information about inisiatif/laravel-event-history
Files in inisiatif/laravel-event-history
Package laravel-event-history
Short Description Record event as history
License MIT
Homepage https://github.com/atInisiatifZakat/laravel-event-history
Informations about the package laravel-event-history
Record event as history
Paket ini digunakan untuk mencatan event seperti Pengajuan sudah di setujui
dll.
Installation
You can install the package via composer:
You can publish and run the migrations with:
Usage
Persiapan
Melakukan registrasi user model, tambahkan code berikut di boot
method AppServiceProvider
Selanjutnya semua model yang mempunyai history harus implement interface Inisiatif\EventHistory\Concerns\HasEventHistories
, kita juga
bisa menggunakan default implementasi dengan trait Inisiatif\EventHistory\InteractWithEventHistories
Menggunakan Listener
Anda bisa menggukakan Inisiatif\EventHistory\RecordEventHistoryListener
untuk setiap event yang akan di catat history-nya,
yang perlu di pastikan adalah event anda harus implements Inisiatif\EventHistory\Concerns\EventHistoryAwareInterface
method getModelAwareHistories
harus return model atau collection dengan interface Inisiatif\EventHistory\Concerns\HasEventHistories
.
Under the hood, listener akan memanggil job Inisiatif\EventHistory\Jobs\NewEventHistoryJob
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Nuradiyana
- All Contributors
License
The MIT License (MIT). Please see License File for more information.