Event.php
public static function hasListeners(string $event) : bool
    {
        if (! isset(Event::$listeners[$event]) || count(Event::$listeners[$event]) === 0) {
            return false;
        }

        return true;
    }
public static function hasListeners(string $event) : bool
    {
        if (! isset(Event::$listeners[$event]) || count(Event::$listeners[$event]) === 0) {
            return false;
        }

        return true;
    }
public static function hasListeners ( string $ event ) : bool { if ( ! isset ( Event :: $ listeners [ $ event ] ) || count ( Event :: $ listeners [ $ event ] ) === 0 ) { return false ; } return true ; }
Check is listeners exists for current event.

if (Event::hasListeners('event_name')) {
// do something...
}

@access public
@param  string  $event       Event name
@return bool    $return      Return data or not. Default is false
Check is listeners exists for current event .