rdehnhardt / model-observers by rdehnhardt

Make model observers easy
12
17
3
Package Data
Maintainer Username: rdehnhardt
Package Create Date: 2017-07-06
Package Last Update: 2017-09-06
Home Page: https://packagist.org/packages/rdehnhardt/model-observers
Language: PHP
License: MIT
Last Refreshed: 2024-05-11 03:03:31
Package Statistics
Total Downloads: 12
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 17
Total Watchers: 3
Total Forks: 1
Total Open Issues: 1

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