src/RegistersWatchers.php
protected static function registerWatchers($app)
    {
        foreach (config('telescope.watchers') as $key => $watcher) {
            if (is_string($key) && $watcher === false) {
                continue;
            }

            if (is_array($watcher) && ! ($watcher['enabled'] ?? true)) {
                continue;
            }

            $watcher = $app->make(is_string($key) ? $key : $watcher, [
                'options' => is_array($watcher) ? $watcher : [],
            ]);

            static::$watchers[] = get_class($watcher);

            $watcher->register($app);
        }
    }
protected static function registerWatchers($app)
    {
        foreach (config('telescope.watchers') as $key => $watcher) {
            if (is_string($key) && $watcher === false) {
                continue;
            }

            if (is_array($watcher) && ! ($watcher['enabled'] ?? true)) {
                continue;
            }

            $watcher = $app->make(is_string($key) ? $key : $watcher, [
                'options' => is_array($watcher) ? $watcher : [],
            ]);

            static::$watchers[] = get_class($watcher);

            $watcher->register($app);
        }
    }
protected static function registerWatchers ( $ app ) { foreach ( config ( 'telescope.watchers' ) as $ key => $ watcher ) { if ( is_string ( $ key ) && $ watcher === false ) { continue ; } if ( is_array ( $ watcher ) && ! ( $ watcher [ 'enabled' ] ?? true ) ) { continue ; } $ watcher = $ app -> make ( is_string ( $ key ) ? $ key : $ watcher , [ 'options' => is_array ( $ watcher ) ? $ watcher : [ ] , ] ) ; static :: $ watchers [ ] = get_class ( $ watcher ) ; $ watcher -> register ( $ app ) ; } }
Register the configured Telescope watchers.

@param  \Illuminate\Foundation\Application  $app
@return void
Register the configured Telescope watchers .