codedge / hookable by codedge
forked from jarektkaczyk/hookable

Laravel Eloquent hooks system - improved.
192
2
3
Package Data
Maintainer Username: codedge
Maintainer Contact: jarek@softonsofa.com (Jarek Tkaczyk)
Package Create Date: 2017-01-19
Package Last Update: 2017-10-30
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-04-22 15:00:26
Package Statistics
Total Downloads: 192
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

codedge/hookable

Improved version of Jarek Tkaczyk superb hook system for Laravel.

Hooks are available for the following methods:

  • Model::getAttribute
  • Model::setAttribute
  • Model::save
  • Model::toArray
  • Model::replicate
  • Model::isDirty
  • Model::__isset
  • Model::__unset

and all methods available on the Illuminate\Database\Eloquent\Builder class.

Additional hooks, mostly for all relation types, are:

  • Model::hasOne

Installation

Clone the repo or pull as composer dependency:

composer require codedge/hookable

Usage

Please see the original package for usage.