Closed thorakmedichi closed 8 years ago
Hey,
This package uses Incoming Webhooks rather than the full Slack API.
You can send an image in using the image_url
field of an attachment. Try:
$client->to('#operations')->attach([
'fallback' => 'It's all broken',
'text' => 'It's all broken',
'pretext' => 'From user: Jim',
'color' => 'bad',
'image_url' => 'http://example.com/image.jpg'
])->send('New alert from the monitoring system');
But what when I try to send for example json file?
Do you plan to support https://api.slack.com/methods/files.upload?
Like @maknz said, this isn't supported by webhooks and the real Slack API is another world. You need an App and Token for it and a lot more differences.
If you want to use the Slack API there are some packages for it: https://github.com/JulienTant/laravel-slack-api https://github.com/palanik/slack-php and I bet that there are more.
Hey man,
So been using your Slack Package for Laravel awhile now and been loving the simplicity of it all.
I have had a new request though that I am having a hard time figuring out how to deal with. I have been asked to send some alerts as jpg images. I know the slack API has this ability ( https://api.slack.com/methods/files.upload ) but I do not see anything in your code that deals with this. Am I just blind or does it not exist?
If it does not exist can you point me in the right direction on where to add this to your codebase.
Cheers
Ryan Stephens