LMongo\Eloquent\Model::registerModelEvent PHP Method

registerModelEvent() protected static method

Register a model event with the dispatcher.
protected static registerModelEvent ( string $event, Closur\Closure | string $callback ) : void
$event string
$callback Closur\Closure | string
return void
    protected static function registerModelEvent($event, $callback)
    {
        if (isset(static::$dispatcher)) {
            $name = get_called_class();
            static::$dispatcher->listen("lmongo.{$event}: {$name}", $callback);
        }
    }
Model