2017 © Pedro Peláez
 

library eloquent-extra-events

Eventos adicionais para o eloquent

image

neylsongularte/eloquent-extra-events

Eventos adicionais para o eloquent

  • Friday, April 6, 2018
  • by neylsongularte
  • Repository
  • 2 Watchers
  • 14 Stars
  • 6,418 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 12 Versions
  • 19 % Grown

The README.md

eloquent-extra-events

Total Downloads Monthly Downloads Daily Downloads Latest Stable Version Latest Unstable Version License, (*1)

Install:, (*2)

For 5.2.x, 5.3.x and 5.4.x:
composer require neylsongularte/eloquent-extra-events:0.3.5
For 5.5.x:
composer require neylsongularte/eloquent-extra-events

In your model:, (*3)

use NeylsonGularte\EloquentExtraEvents\ExtraEventsTrait;, (*4)

Events: * eloquent.syncing * eloquent.synced * eloquent.attaching * eloquent.attached * eloquent.detaching * eloquent.detached, (*5)

Listen events in App\Providers\AppServiceProvider:, (*6)

In 5.2.x and 5.3.x:
Event::listen('eloquent.syncing*', function (array $eventData) {
});

In 5.4.x and 5.5.x:
Event::listen('eloquent.syncing*', function ($eventName, array $eventData) {
});

Available properties:, (*7)

  • $eventData['parent_model']: string e.g. 'App\Models\Model'
  • $eventData['parent_id']: integer e.g. 42
  • $eventData['related_model']: string e.g. 'App\Models\Model'
  • (except eloquent.synced) $eventData['related_ids']: array e.g. [31,41]
  • (Only eloquent.detached) $eventData['results']: integer e.g. 2
  • (Only eloquent.synced) $eventData['changes']: array with the following keys:
    • 'attached': array e.g. [1, 8]
    • 'detached': array e.g. [15, 16]
    • 'updated': array e.g. [23]

Note: sync trigger attach and detach., (*8)

The Versions

06/04 2018

v0.x-dev

0.9999999.9999999.9999999-dev

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

06/04 2018

0.4.1

0.4.1.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

14/10 2017

dev-master

9999999-dev

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

14/10 2017

1.0.0

1.0.0.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

23/06 2017

0.3.5

0.3.5.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

23/06 2017

0.3.4

0.3.4.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

11/05 2017

0.3.3

0.3.3.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

11/05 2017

0.3.2

0.3.2.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

11/05 2017

0.3.1

0.3.1.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

11/05 2017

0.3.0

0.3.0.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

11/05 2017

0.2.0

0.2.0.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9

 

10/05 2017

0.1.0

0.1.0.0

Eventos adicionais para o eloquent

  Sources   Download

The Requires

  • php >=5.5.9