/**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     Broadcast::routes();
     /*
      * Authenticate the user's personal channel...
      */
     Broadcast::channel('App.User.*', function ($user, $userId) {
         return (int) $user->id === (int) $userId;
     });
 }
 /**
  * Get a default broadcast value, if any is available
  *
  * @return Broadcaster|null A default broadcast value or Null if no default value is available
  */
 public function getDefaultBroadcast()
 {
     // By default, the Broadcast Facade does not return the
     // any actual broadcaster, but rather an
     // instance of a manager.
     // Therefore, we make sure only to obtain its
     // "broadcaster", to make sure that its only the
     // connection is obtained!
     $manager = Broadcast::getFacadeRoot();
     if (!is_null($manager)) {
         return $manager->connection();
     }
     return $manager;
 }
 /**
  * Get a default broadcast factory value, if any is available
  *
  * @return Factory|null A default broadcast factory value or Null if no default value is available
  */
 public function getDefaultBroadcastFactory()
 {
     return Broadcast::getFacadeRoot();
 }
 /**
  * Store the socket ID for the current user.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return void
  */
 public function rememberSocket(Request $request)
 {
     return Broadcast::rememberSocket($request);
 }
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     Broadcast::routes();
 }
 /**
  * Exclude the current user from receiving the broadcast.
  *
  * @return $this
  */
 public function dontBroadcastToCurrentUser()
 {
     $this->socket = Broadcast::socket();
     return $this;
 }
 /**
  * Exclude the current user from receiving the broadcast.
  *
  * @return $this
  */
 public function exceptCurrentUser()
 {
     $this->socket = Broadcast::socket();
     return $this;
 }
 /**
  * Authenticate the request for channel access.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function authenticate(Request $request)
 {
     return Broadcast::auth($request);
 }