dev-master
9999999-devLaravel package for Model history logging.
The Requires
- php >=5.5.9
- illuminate/support >5.0
by Beck AndrĂĄs
laravel log model history
Laravel package for Model history logging.
This is a Laravel 5 package, that can log Model history., (*1)
It's under development, not recommended for production use!, (*2)
add bundle to composer:, (*3)
"andrewboy/historylog": "dev-master"
run composer:, (*4)
composer install / update
add service provider to the providers list:, (*5)
'Andrewboy\HistoryLog\HistoryLogServiceProvider'
publish config and migration:, (*6)
php artisan vendor:publish --provider="Andrewboy\HistoryLog\HistoryLogServiceProvider"
run migration:, (*7)
php artisan migrate
use Andrewboy\HistoryLog\Traits\HistoryLogTrait; trait MyHistoryLogTrait{ use HistoryLogTrait; /** * Get the logged users' ID * @return integer | null On success user ID */ public function getUserId() { ... } }
use App\Traits\MyHistoryLogTrait; class MyModel extends Model { use MyHistoryLogTrait; }
Laravel package for Model history logging.
laravel log model history