public static function flushEventListeners()
    {
        if (! isset(static::$dispatcher)) {
            return;
        }

        $instance = new static;

        foreach ($instance->getObservableEvents() as $event) {
            static::$dispatcher->forget("eloquent.{$event}: ".static::class);
        }

        foreach (array_values($instance->dispatchesEvents) as $event) {
            static::$dispatcher->forget($event);
        }
    }
public static function flushEventListeners()
    {
        if (! isset(static::$dispatcher)) {
            return;
        }

        $instance = new static;

        foreach ($instance->getObservableEvents() as $event) {
            static::$dispatcher->forget("eloquent.{$event}: ".static::class);
        }

        foreach (array_values($instance->dispatchesEvents) as $event) {
            static::$dispatcher->forget($event);
        }
    }
public static function flushEventListeners ( ) { if ( ! isset ( static :: $ dispatcher ) ) { return ; } $ instance = new static ; foreach ( $ instance -> getObservableEvents ( ) as $ event ) { static :: $ dispatcher -> forget ( "eloquent.{$event}: " . static :: class ) ; } foreach ( array_values ( $ instance -> dispatchesEvents ) as $ event ) { static :: $ dispatcher -> forget ( $ event ) ; } }
Remove all of the event listeners for the model.

@return void
Remove all of the event listeners for the model .