Skip to content

A package for Laravel Framework to manipulate with Chatwork API easily

License

Notifications You must be signed in to change notification settings

sun-asterisk-research/laravel-chatwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Chatwork SDK

Latest Stable Version

Chatwork SDK for Laravel 5, 6, 7.

Installation

Using composer:

composer require sun-asterisk/laravel-chatwork

For Laravel 5.4 and earlier, add the service provider to your config/app.php.

'providers' => [
    // ...
    SunAsterisk\Chatwork\Laravel\ServiceProvider::class
    // ...
];

Configure

First register an API Key here. Then add the API key to your .env:

CHATWORK_API_KEY=your_api_key_here

Usage

You can use the provided facade via an alias:

use Chatwork;

$me = Chatwork::me();
$members = Chatwork::room($roomId)->members()->list();

Or use dependency injection:

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);
    }
}

About

A package for Laravel Framework to manipulate with Chatwork API easily

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages