rdehnhardt/model-observers

Make model observers easy
14 16
Install
composer require rdehnhardt/model-observers
Latest Version:1.0.2
PHP:>=5.5.0
Laravel:5
License:MIT
Last Updated:Sep 6, 2017
Links: GitHub  ·  Packagist
Maintainer: rdehnhardt

model-observer

Set observer for model

Installation

Run the following command to get the latest version package

composer require rdehnhardt/model-observer
// app/Customer.php
namespace App;

use Illuminate\Database\Eloquent\Model;
use Rdehnhardt\ModelObserver\ModelObserver;

class Customer extends Model
{
    use ModelObserver;

    /**
     * Models Observer
     *
     * @var string
     */
    protected static $observer = UserObserver::class;
}

Contributing

Contributions are welcomed; to keep things organized, all bugs and requests should be opened on github issues tab for the main project in the rdehnhardt/model-observer/issues.

All pull requests should be made to the branch Develop, so they can be tested before being merged into the master branch.

Having problems?

If you are having problems with the use of this package, there is likely someone has faced the same problem. You can find common answers to their problems:

License

The model-observer package is open source software licensed under the license MIT

Related Packages

stayallive/laravel-eloquent-observable

Register Eloquent model event listeners just-in-time directly from the model.

78,147 29
sofa/hookable

Laravel Eloquent hooks system.

2,049,184 65
volosyuk/simple-eloquent

Adaptation of eloquent for retrieving its attributes

117,433 55
gzero/eloquent-tree

Eloquent Tree is a tree model for Laravel Eloquent ORM.

59,422 131
martinbean/laravel-sluggable-trait

A trait you can apply to Eloquent models to have slugs automatically generated o...

49,105 24

Version History

Version Released PHP Laravel License
1.0.2 >=5.5.0 5.* MIT
1.0.1 >=5.5.0 5.* MIT
1.0.0 >=5.5.0 5.* MIT