PHP code example of antonioprimera / laravel-slack
1. Go to this page and download the library: Download antonioprimera/laravel-slack library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
antonioprimera / laravel-slack example snippets
use AntonioPrimera\Slack\Slack;
Slack::post('This is the most basic usage, and will post a message to Slack');
use AntonioPrimera\Slack\Slack;
Slack::channel('my-channel')
->from('Antonio')
->emoji('happy-face')
->post('Hello Slack!');
use AntonioPrimera\Slack\Slack;
Slack::channel('james', true)
->from('Antonio')
->post('Hello James!');
Slack::from('Antonio')
->directMessage('james', 'Hello James!');