src/modules/Slack/SlackMessageSender.php
/**
     * Sends message to slack user or users
     *
     * @param $usernames
     * @param $message
     */
Sends message to slack user or users
@param $usernames
@param $message
Sends message to slack user or users @param $usernames @param $message
public function toUser($usernames, $message)
    {
        $usernames = is_array($usernames) ? $usernames : [$usernames];
        foreach ($usernames as $username) {
            $username = (substr($username, 0, 1) === '@') ? $username : "@{$username}";
            $this->getMessage()->to($username)->send($message);
        }
    }
public function toUser ( $ usernames , $ message ) { $ usernames = is_array ( $ usernames ) ? $ usernames : [ $ usernames ] ; foreach ( $ usernames as $ username ) { $ username = ( substr ( $ username , 0 , 1 ) === '@' ) ? $ username : " @ { $ username } " ; $ this -> getMessage ( ) -> to ( $ username ) -> send ( $ message ) ; } }
Sends message to slack user or users
 @param $usernames
 @param $message
Sends message to slack user or users @param $usernames @param $message