BroadcastServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php namespace JobApis\JobsToMail\Providers;
2
3
use Illuminate\Support\ServiceProvider;
4
use Illuminate\Support\Facades\Broadcast;
5
6
class BroadcastServiceProvider extends ServiceProvider
7
{
8
    /**
9
     * Bootstrap any application services.
10
     *
11
     * @return void
12
     */
13
    public function boot()
14
    {
15
        Broadcast::routes();
16
17
        /*
18
         * Authenticate the user's personal channel...
19
         */
20
        Broadcast::channel('App.User.*', function ($user, $userId) {
21
            return (int) $user->id === (int) $userId;
22
        });
23
    }
24
}
25