This repository has been archived by the owner on Oct 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Pascal Boucher edited this page Jun 12, 2018
·
3 revisions
Include the Facade class at the top of your file
use Chatkit;
After that, authenticate your user with the api
Chatkit::withUser($userId);
Some api calls require a sudo token. You can easily authenticate has a sudo user like this.
Chatkit::withSudoUser($userId);
That's it. You can now build something amazing.
Example
Route::get('chatkit/api/get-user', function () {
Chatkit::withUser($userId);
$chatkitUser = Chatkit::users()->show($chatkitUserId);
dd($chatkitUser);
});
The goal of this package is to extends the capacity of the official PHP SDK and give access to the entire api functionalities with a clean laravel-like syntax.
The official pusher chatkit api documentation can be found here.