mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3311 [messages-module] Refresh page
This commit is contained in:
parent
4f26ef689a
commit
f7ea3a8c40
@ -7,7 +7,6 @@ use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
@ -17,14 +16,6 @@ class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
/*
|
||||
* Authenticate the user's personal channel...
|
||||
*/
|
||||
Broadcast::channel(
|
||||
'App.User.*',
|
||||
function ($user, $userId) {
|
||||
return (int)$user->id === (int)$userId;
|
||||
}
|
||||
);
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,7 +204,7 @@ return [
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
'default' => env('BROADCAST_DRIVER', 'pusher'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -32,11 +32,19 @@ return [
|
||||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_KEY'),
|
||||
'secret' => env('PUSHER_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'key' => env('PUSHER_APP_KEY', 12345),
|
||||
'secret' => env('PUSHER_APP_SECRET', 12345),
|
||||
'app_id' => env('PUSHER_APP_ID', 12345),
|
||||
'options' => [
|
||||
//
|
||||
'cluster' => env('PUSHER_APP_CLUSTER', 'mt1'),
|
||||
'encrypted' => env('BROADCAST_SSL', false),
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6001,
|
||||
'scheme' => env('BROADCAST_SSL', false) ? 'https' : 'http',
|
||||
'curl_options' => [
|
||||
CURLOPT_SSL_VERIFYHOST => 0,
|
||||
CURLOPT_SSL_VERIFYPEER => 0,
|
||||
]
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
18
routes/channels.php
Normal file
18
routes/channels.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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.Models.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user