1. Go to this page and download the library: Download wgmv/laravel-slack-api 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/ */
//Lists all users on your team
SlackUser::lists();
//Lists all channels on your team
SlackChannel::lists();
//List all groups
SlackGroup::lists();
//Invite a new member to your team
SlackUserAdmin::invite("[email protected]", [
'first_name' => 'John',
'last_name' => 'Doe'
]);
// or just use the helper
//Autoload the api
slack()->post('chat.postMessage', [...]);
//Autoload a Slack Method
slack('Chat')->message([...]);
slack('Team')->info();