Базовая версия сервера API с авторизацией по протоколу OAuth2

This commit is contained in:
Andrey Pokidov
2020-02-27 13:11:52 +07:00
commit 2b167b585f
98 changed files with 9984 additions and 0 deletions

16
routes/channels.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
});