2017 © Pedro PelĂĄez
 

library historylog

Laravel package for Model history logging.

image

andrewboy/historylog

Laravel package for Model history logging.

  • Thursday, October 1, 2015
  • by andrewboy
  • Repository
  • 1 Watchers
  • 2 Stars
  • 300 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 54 % Grown

The README.md

HistoryLog

This is a Laravel 5 package, that can log Model history., (*1)

It's under development, not recommended for production use!, (*2)

Installation

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

Usage

  1. You have to create a Trait that uses the "HistoryLog" trait and implement the "getUserId" abstract method.

use Andrewboy\HistoryLog\Traits\HistoryLogTrait; trait MyHistoryLogTrait{ use HistoryLogTrait; /** * Get the logged users' ID * @return integer | null On success user ID */ public function getUserId() { ... } }
  1. Simply just add the trait to your model

use App\Traits\MyHistoryLogTrait; class MyModel extends Model { use MyHistoryLogTrait; }

The Versions

01/10 2015

dev-master

9999999-dev

Laravel package for Model history logging.

  Sources   Download

The Requires

 

by Beck AndrĂĄs

laravel log model history