PHP code example of sun-asterisk / laravel-chatwork
1. Go to this page and download the library: Download sun-asterisk/laravel-chatwork 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/ */
sun-asterisk / laravel-chatwork example snippets
'providers' => [
// ...
SunAsterisk\Chatwork\Laravel\ServiceProvider::class
// ...
];
use Chatwork;
$me = Chatwork::me();
$members = Chatwork::room($roomId)->members()->list();
use SunAsterisk\Chatwork\Chatwork;
class ChatworkCommand extends Command
{
public function handle(Chatwork $chatwork)
{
$message = $chatwork->toAll()->text('Hi there');
$chatwork->room($roomId)->messages()->create($message);
}
}