Closed HTMLGuyLLC closed 6 years ago
I suggest you return the http client when you send the message or create a public method to get last http code.
I was looking for it in the wrong channel and I had the other channel muted! ha. Wow.
On the plus side, I realized how ridic it is to use your package anyway.
It's literally less code to post directly to slack, and I've already got this code inside a symfony service I created a while ago that used a diff package that wasn't symfony 4 compatible.
$client = new Client();
return $client->post($this->endpoint, [
RequestOptions::JSON =>[
'text'=>$this->env.':'.$msg,
'icon_emoji'=>$emoji,
'username'=>$username,
'channel'=>'#'.$channel
]
]);
Tried this way and the same way as your readme (chained with
->from()->to()->send('hi')
)I assume something is working because there's no error, but nothing shows up on slack. I'm verified my endpoint twice and can't figure out what's wrong. Any ideas?
Here's what I get when I var_dump the client after sending the message: