https://github.com/piesocket/piesocket-php
PieSocket WebSocket PHP REST Client
https://github.com/piesocket/piesocket-php
Last synced: 5 months ago
JSON representation
PieSocket WebSocket PHP REST Client
- Host: GitHub
- URL: https://github.com/piesocket/piesocket-php
- Owner: piesocket
- Created: 2021-10-06T03:03:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-08T07:57:14.000Z (over 4 years ago)
- Last Synced: 2024-08-10T09:05:49.305Z (almost 2 years ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PieSocket PHP REST Client
PieSocket PHP REST client
## Configure
Skip to [installation](#installation)
### Laravel
#### Quick start
Use the starter project: [piesocket/laravel-broadcasting-starter](https://github.com/piesocket/laravel-broadcasting-starter)
### Manual
In `composer.json` add the following `post-autoload-dump` script at the top.
```
\\PieSocket\\Integrations\\Installer::setupLaravel
```
Example:
```
"scripts": {
"post-autoload-dump": [
"\\PieSocket\\Integrations\\Installer::setupLaravel",
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
]
```
Add PieSocket driver in `connections` array of `config\broadcasting.php` alongside `pusher` configuration.
```
'piesocket' => [
'driver' => 'piesocket',
'key' => env('PIESOCKET_API_KEY'),
'secret' => env('PIESOCKET_API_SECRET'),
'cluster_id' => env('PIESOCKET_CLUSTER_ID'),
]
```
Documentation: [Laravel Broadcasting with PieSocket](https://www.piesocket.com/blog/laravel-echo-broadcasting/)
## Installation
Make sure you have completed the configuration for your integration (optional).
```
composer require piesocket/piesocket-php
```