2017 © Pedro Peláez
 

library laravel-uuid-auditing

This package adds Traits for generating UUIDs and filling audit columns on Models, extends fico7489/laravel-pivot to add UUIDs to Pivot Tables

image

beitsafe/laravel-uuid-auditing

This package adds Traits for generating UUIDs and filling audit columns on Models, extends fico7489/laravel-pivot to add UUIDs to Pivot Tables

  • Wednesday, January 10, 2018
  • by beitsafedaniel
  • Repository
  • 2 Watchers
  • 2 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 35 % Grown

The README.md

Laravel UUID Auditing

This package adds Traits for generating UUIDs and filling audit columns on Models, extends fico7489/laravel-pivot to add UUIDs to Pivot Tables, (*1)

Based On

This package is based on https://github.com/fico7489/laravel-pivot and using webpatser/laravel-uuid, (*2)

Install

1.Install package with composer, (*3)

composer require beitsafe/laravel-uuid-auditing:"@dev"

Configure Automatically

  1. Use BeITSafe\Laravel\Models\BeITSafeModel trait in your base model or only in particular models. This will automatically generate UUIDs for BOTH Models and Pivot Tables.
...
use BeITSafe\Laravel\Models\BeITSafeModel;

class SomeModel extends BeITSafeModel
{
...

Configure UUIDs Manually

1.Use BeITSafe\Laravel\Traits\Uuids trait in your base model or only in particular models. This will automatically generate UUIDs for BOTH Models and Pivot Tables., (*4)

...
use BeITSafe\Laravel\Traits\Uuids;
use Illuminate\Database\Eloquent\Model;

abstract class BaseModel extends Model
{
    use Uuids;
...

Configure Auditing Manually

1.Use BeITSafe\Laravel\Traits\Auditing trait in your base model or only in particular models. This will automatically save the Auth::user()->id to 'created_by', 'updated_by', 'deleted_by' if there is a logged in User and the column exists in the Model., (*5)

...
use BeITSafe\Laravel\Traits\Auditing;
use Illuminate\Database\Eloquent\Model;

abstract class BaseModel extends Model
{
    use Auditing;
...

New eloquent events

New events are :, (*6)

pivotAttaching, pivotAttached
pivotDetaching, pivotDetached,
pivotUpdating, pivotUpdated

License

MIT, (*7)

The Versions

10/01 2018

dev-master

9999999-dev https://github.com/beitsafe/laravel-uuid-auditing

This package adds Traits for generating UUIDs and filling audit columns on Models, extends fico7489/laravel-pivot to add UUIDs to Pivot Tables

  Sources   Download

MIT

The Requires

 

laravel pivot events laravel belongstomany events eloquent extra events laravel sync events eloquent events laravel pivot uuids