PHP code example of tiagomichaelsousa / slack-laravel
1. Go to this page and download the library: Download tiagomichaelsousa/slack-laravel 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/ */
tiagomichaelsousa / slack-laravel example snippets
use Slack\Laravel\Facades\Slack;
$conversations = Slack::conversations()->create('foo');
echo $conversations->channel->name;
use Slack\Laravel\Facades\Slack;
use Slack\Responses\Conversation\CreateConversationResponse;
Slack::fake([
CreateConversationResponse::fake([
'channel' => [
'name' => 'foo',
],
]);
]);
$conversations = Slack::conversations()->create('foo');
expect($conversations->channel)->name->toBe('foo');
bash
php artisan vendor:publish --provider="Slack\Laravel\ServiceProvider"