src/BotMan.php
public function on($names, $callback)
    {
        if (! is_array($names)) {
            $names = [$names];
        }

        $callable = $this->getCallable($callback);

        foreach ($names as $name) {
            $this->events[] = [
                'name' => $name,
                'callback' => $callable,
            ];
        }
    }
public function on($names, $callback)
    {
        if (! is_array($names)) {
            $names = [$names];
        }

        $callable = $this->getCallable($callback);

        foreach ($names as $name) {
            $this->events[] = [
                'name' => $name,
                'callback' => $callable,
            ];
        }
    }
public function on ( $ names , $ callback ) { if ( ! is_array ( $ names ) ) { $ names = [ $ names ] ; } $ callable = $ this -> getCallable ( $ callback ) ; foreach ( $ names as $ name ) { $ this -> events [ ] = [ 'name' => $ name , 'callback' => $ callable , ] ; } }
Listen for messaging service events.

@param array|string $names
@param Closure|string $callback
Listen for messaging service events .