Created
September 18, 2019 23:55
-
-
Save bayareawebpro/159bfbb031a5c5eae28121f0c8648311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pusher API: User Online Status | |
* Not Implemented (may need for future use) | |
*/ | |
Route::any('online', function(Request $request){ | |
/** @var $pusher \App\PusherApi */ | |
$pusher = app()->make('pusherApi'); | |
$channel = $request->get('channel', 'presence-App.Job.9'); | |
$user_id = $request->get('user_id', 2); | |
$status = $pusher->isOnline($channel,$user_id); | |
return response(array( | |
'message' => 'Is User Online?', | |
'channel' => $channel, | |
'user_id' => $user_id, | |
'status' => $status | |
), 200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment