rdehnhardt/model-observers

Make model observers easy
14 16
Install
composer require rdehnhardt/model-observers
Latest Version:1.0.2
PHP:>=5.6.0
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.

61,327 29
hootlex/laravel-friendships

This package gives Eloquent models the ability to manage their friendships.

120,145 700
spatie/laravel-sluggable

Generate slugs when saving Eloquent models

13,431,666 1,553
kodeine/laravel-acl

Light-weight role-based permissions for Laravel 5 built in Auth system.

361,720 777